[][src]Enum bcder::encode::Choice2

pub enum Choice2<L, R> {
    One(L),
    Two(R),
}

A value encoder for a two-variant enum.

Instead of implementing Values for an enum manually, you can just define a method encode that returns a value of this type.

Variants

One(L)

The first choice.

Two(R)

The second choice.

Trait Implementations

impl<L: Values, R: Values> Values for Choice2<L, R>[src]

Auto Trait Implementations

impl<L, R> RefUnwindSafe for Choice2<L, R> where
    L: RefUnwindSafe,
    R: RefUnwindSafe
[src]

impl<L, R> Send for Choice2<L, R> where
    L: Send,
    R: Send
[src]

impl<L, R> Sync for Choice2<L, R> where
    L: Sync,
    R: Sync
[src]

impl<L, R> Unpin for Choice2<L, R> where
    L: Unpin,
    R: Unpin
[src]

impl<L, R> UnwindSafe for Choice2<L, R> where
    L: UnwindSafe,
    R: UnwindSafe
[src]

Blanket Implementations

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

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

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

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.