[][src]Struct show_notes::e031::unions::Either

pub struct Either<L: Copy, R: Copy> {
    pub tag: Tag,
    pub value: EitherValue<L, R>,
}

Uses an enum and a union to get close to a regular Rust enum.

Roughly, because the compiler won't check you for exhaustiveness, or even make sure you're using the tag and value pair the way you should!

Fields

tag: Tagvalue: EitherValue<L, R>

Auto Trait Implementations

impl<L, R> Send for Either<L, R> where
    L: Send,
    R: Send

impl<L, R> Unpin for Either<L, R> where
    L: Unpin,
    R: Unpin

impl<L, R> Sync for Either<L, R> where
    L: Sync,
    R: Sync

impl<L, R> RefUnwindSafe for Either<L, R> where
    L: RefUnwindSafe,
    R: RefUnwindSafe

impl<L, R> UnwindSafe for Either<L, R> where
    L: UnwindSafe,
    R: UnwindSafe

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]