[][src]Struct spirit_tokio::either::EitherDriver

pub struct EitherDriver<A, B> where
    A: Fragment,
    B: Fragment
{ /* fields omitted */ }

A Driver used for Either Fragments.

This switches between driving the variants ‒ if the fragment changes from one variant to another, the old driver is dropped and new one created for the other one. If the variant stays the same, driving is delegated to the existing driver.

Note that there are limitations to what this driver implementation ‒ see the Either drawbacks.

Trait Implementations

impl<A: Debug, B: Debug> Debug for EitherDriver<A, B> where
    A: Fragment,
    B: Fragment,
    A::Driver: Debug,
    B::Driver: Debug,
    A::Driver: Debug,
    B::Driver: Debug
[src]

impl<A, B> Default for EitherDriver<A, B> where
    A: Fragment,
    A::Driver: Default,
    B: Fragment
[src]

impl<A, B> Driver<Either<A, B>> for EitherDriver<A, B> where
    A: Fragment,
    A::Driver: Driver<A, SubFragment = A> + Default,
    B: Fragment,
    B::Driver: Driver<B, SubFragment = B> + Default
[src]

type SubFragment = Either<A, B>

The smaller Fragment the driver cuts F into. Read more

Auto Trait Implementations

impl<A, B> RefUnwindSafe for EitherDriver<A, B> where
    <A as Fragment>::Driver: RefUnwindSafe,
    <B as Fragment>::Driver: RefUnwindSafe

impl<A, B> Send for EitherDriver<A, B> where
    <A as Fragment>::Driver: Send,
    <B as Fragment>::Driver: Send

impl<A, B> Sync for EitherDriver<A, B> where
    <A as Fragment>::Driver: Sync,
    <B as Fragment>::Driver: Sync

impl<A, B> Unpin for EitherDriver<A, B> where
    <A as Fragment>::Driver: Unpin,
    <B as Fragment>::Driver: Unpin

impl<A, B> UnwindSafe for EitherDriver<A, B> where
    <A as Fragment>::Driver: UnwindSafe,
    <B as Fragment>::Driver: UnwindSafe

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> IntoResult<T> for 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.