[−][src]Struct spirit_tokio::either::EitherDriver
A Driver
used for Either
Fragment
s.
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]
A: Fragment,
B: Fragment,
A::Driver: Debug,
B::Driver: Debug,
A::Driver: Debug,
B::Driver: Debug,
impl<A, B> Default for EitherDriver<A, B> where
A: Fragment,
A::Driver: Default,
B: Fragment,
[src]
A: Fragment,
A::Driver: Default,
B: Fragment,
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]
A: Fragment,
A::Driver: Driver<A, SubFragment = A> + Default,
B: Fragment,
B::Driver: Driver<B, SubFragment = B> + Default,
type SubFragment = Either<A, B>
fn instructions<T, I>(
&mut self,
fragment: &Either<A, B>,
transform: &mut T,
name: &'static str
) -> Result<Vec<Instruction<T::OutputResource>>, Vec<AnyError>> where
T: Transformation<<Self::SubFragment as Fragment>::Resource, I, Self::SubFragment>,
[src]
&mut self,
fragment: &Either<A, B>,
transform: &mut T,
name: &'static str
) -> Result<Vec<Instruction<T::OutputResource>>, Vec<AnyError>> where
T: Transformation<<Self::SubFragment as Fragment>::Resource, I, Self::SubFragment>,
fn confirm(&mut self, name: &'static str)
[src]
fn abort(&mut self, name: &'static str)
[src]
fn maybe_cached(&self, fragment: &Either<A, B>, name: &'static str) -> bool
[src]
Auto Trait Implementations
impl<A, B> RefUnwindSafe for EitherDriver<A, B> where
<A as Fragment>::Driver: RefUnwindSafe,
<B as Fragment>::Driver: RefUnwindSafe,
<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,
<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,
<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,
<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,
<A as Fragment>::Driver: UnwindSafe,
<B as Fragment>::Driver: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> IntoResult<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,