pub struct Then<I, P1, P2>(/* private fields */);
Expand description
Then
combinator.
Trait Implementations§
source§impl<I, E, P1, P2> AsyncOperator<I> for Then<I, P1, P2>where
P1: AsyncOperator<I, Error = E>,
P2: AsyncOperator<P1::Output, Error = E>,
impl<I, E, P1, P2> AsyncOperator<I> for Then<I, P1, P2>where P1: AsyncOperator<I, Error = E>, P2: AsyncOperator<P1::Output, Error = E>,
§type Output = <P2 as AsyncOperator<<P1 as AsyncOperator<I>>::Output>>::Output
type Output = <P2 as AsyncOperator<<P1 as AsyncOperator<I>>::Output>>::Output
Output type.
§type Future<'a> = AndThenFuture<'a, <P1 as AsyncOperator<I>>::Future<'a>, P2>
where
I: 'a,
P1: 'a,
P2: 'a
type Future<'a> = AndThenFuture<'a, <P1 as AsyncOperator<I>>::Future<'a>, P2> where I: 'a, P1: 'a, P2: 'a
The future output value.
source§impl<I, P1, P2> Operator<I> for Then<I, P1, P2>where
P1: Operator<I>,
P2: Operator<P1::Output>,
impl<I, P1, P2> Operator<I> for Then<I, P1, P2>where P1: Operator<I>, P2: Operator<P1::Output>,
impl<I: Copy, P1: Copy, P2: Copy> Copy for Then<I, P1, P2>
Auto Trait Implementations§
impl<I, P1, P2> RefUnwindSafe for Then<I, P1, P2>where P1: RefUnwindSafe, P2: RefUnwindSafe,
impl<I, P1, P2> Send for Then<I, P1, P2>where P1: Send, P2: Send,
impl<I, P1, P2> Sync for Then<I, P1, P2>where P1: Sync, P2: Sync,
impl<I, P1, P2> Unpin for Then<I, P1, P2>where P1: Unpin, P2: Unpin,
impl<I, P1, P2> UnwindSafe for Then<I, P1, P2>where P1: UnwindSafe, P2: UnwindSafe,
Blanket Implementations§
source§impl<I, P> AsyncOperatorExt<I> for Pwhere
P: AsyncOperator<I>,
impl<I, P> AsyncOperatorExt<I> for Pwhere P: AsyncOperator<I>,
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T, P> ContextOperatorExt<T> for Pwhere
P: ContextOperator<T>,
impl<T, P> ContextOperatorExt<T> for Pwhere P: ContextOperator<T>,
source§fn boxed(self) -> BoxContextOperator<In, Self::Out>where
Self: Send + Sized + 'static,
fn boxed(self) -> BoxContextOperator<In, Self::Out>where Self: Send + Sized + 'static,
Create a boxed
ContextOperator
.source§fn finish(self) -> ContextedOperator<Self>where
Self: Sized,
fn finish(self) -> ContextedOperator<Self>where Self: Sized,
Build into an operator without the
Value
wrapper.source§fn finish_with_data(self, data: Map) -> ContextedOperator<Self>where
Self: Sized,
fn finish_with_data(self, data: Map) -> ContextedOperator<Self>where Self: Sized,
Build into an operator without the
Value
wrapper with the given data context.source§fn cache(self, length: usize) -> CacheOperator<Self>where
Self: Sized,
fn cache(self, length: usize) -> CacheOperator<Self>where Self: Sized,
Add a cache layer with the given
length
. Read moresource§fn insert_env<R, Out>(self, f: impl Fn() -> R) -> InsertOperator<Self, R>where
R: for<'a> RefOperator<'a, In, Output = Out>,
Out: Send + Sync + 'static,
Self: Sized,
fn insert_env<R, Out>(self, f: impl Fn() -> R) -> InsertOperator<Self, R>where R: for<'a> RefOperator<'a, In, Output = Out>, Out: Send + Sync + 'static, Self: Sized,
Add a
Insert
layer with the given RefOperator
constructor
(i.e. a function that returns a RefOperator
). Read moresource§fn insert_env_if<R, Out>(
self,
enable: bool,
f: impl Fn() -> R
) -> Either<InsertOperator<Self, R>, Self>where
R: for<'a> RefOperator<'a, In, Output = Out>,
Out: Send + Sync + 'static,
Self: Sized,
fn insert_env_if<R, Out>( self, enable: bool, f: impl Fn() -> R ) -> Either<InsertOperator<Self, R>, Self>where R: for<'a> RefOperator<'a, In, Output = Out>, Out: Send + Sync + 'static, Self: Sized,
source§fn insert_data<R, Out>(self, f: impl Fn() -> R) -> InsertDataOperator<Self, R>where
R: for<'a> RefOperator<'a, In, Output = Option<Out>>,
Out: Send + Sync + 'static,
Self: Sized,
fn insert_data<R, Out>(self, f: impl Fn() -> R) -> InsertDataOperator<Self, R>where R: for<'a> RefOperator<'a, In, Output = Option<Out>>, Out: Send + Sync + 'static, Self: Sized,
Add a
InsertData
layer with the given RefOperator
constructor.
(i.e. a function that returns a RefOperator
). Read moresource§fn insert_data_if<R, Out>(
self,
enable: bool,
f: impl Fn() -> R
) -> Either<InsertDataOperator<Self, R>, Self>where
R: for<'a> RefOperator<'a, In, Output = Option<Out>>,
Out: Send + Sync + 'static,
Self: Sized,
fn insert_data_if<R, Out>( self, enable: bool, f: impl Fn() -> R ) -> Either<InsertDataOperator<Self, R>, Self>where R: for<'a> RefOperator<'a, In, Output = Option<Out>>, Out: Send + Sync + 'static, Self: Sized,
source§fn insert<R, Env, Data>(
self,
f: impl Fn() -> R
) -> InsertWithDataOperator<Self, R>where
R: for<'a> RefOperator<'a, In, Output = (Env, Option<Data>)>,
Env: Send + Sync + 'static,
Data: Send + Sync + 'static,
Self: Sized,
fn insert<R, Env, Data>( self, f: impl Fn() -> R ) -> InsertWithDataOperator<Self, R>where R: for<'a> RefOperator<'a, In, Output = (Env, Option<Data>)>, Env: Send + Sync + 'static, Data: Send + Sync + 'static, Self: Sized,
Add a
InsertWithData
layer with the given RefOperator
constructor.
(i.e. a function that returns a RefOperator
). Read moresource§fn insert_if<R, Env, Data>(
self,
enable: bool,
f: impl Fn() -> R
) -> Either<InsertWithDataOperator<Self, R>, Self>where
R: for<'a> RefOperator<'a, In, Output = (Env, Option<Data>)>,
Env: Send + Sync + 'static,
Data: Send + Sync + 'static,
Self: Sized,
fn insert_if<R, Env, Data>( self, enable: bool, f: impl Fn() -> R ) -> Either<InsertWithDataOperator<Self, R>, Self>where R: for<'a> RefOperator<'a, In, Output = (Env, Option<Data>)>, Env: Send + Sync + 'static, Data: Send + Sync + 'static, Self: Sized,
source§fn inspect<F>(self, f: F) -> InspectOperator<Self, F>where
F: Fn(&In, &Context) + Clone,
Self: Sized,
fn inspect<F>(self, f: F) -> InspectOperator<Self, F>where F: Fn(&In, &Context) + Clone, Self: Sized,
Add an inspect layer with the given closure.
source§fn provide<D>(self, data: D) -> AddDataOperator<D, Self>where
D: Clone + Send + Sync + 'static,
Self: Sized,
fn provide<D>(self, data: D) -> AddDataOperator<D, Self>where D: Clone + Send + Sync + 'static, Self: Sized,
Provide data to the context.
source§fn provide_if<D>(
self,
data: Option<D>
) -> Either<AddDataOperator<D, Self>, Self>where
D: Clone + Send + Sync + 'static,
Self: Sized,
fn provide_if<D>( self, data: Option<D> ) -> Either<AddDataOperator<D, Self>, Self>where D: Clone + Send + Sync + 'static, Self: Sized,
Optionally provide data to the context. Read more
source§fn provide_with<D>(
self,
provider: impl Fn() -> Option<D> + Send + Sync + 'static
) -> AddDataOperator<D, Self>where
D: Send + Sync + 'static,
Self: Sized,
fn provide_with<D>( self, provider: impl Fn() -> Option<D> + Send + Sync + 'static ) -> AddDataOperator<D, Self>where D: Send + Sync + 'static, Self: Sized,
Provide data to the context with the given data provider.
source§fn provide_with_if<D>(
self,
enable: bool,
provider: impl Fn() -> Option<D> + Send + Sync + 'static
) -> Either<AddDataOperator<D, Self>, Self>where
D: Send + Sync + 'static,
Self: Sized,
fn provide_with_if<D>( self, enable: bool, provider: impl Fn() -> Option<D> + Send + Sync + 'static ) -> Either<AddDataOperator<D, Self>, Self>where D: Send + Sync + 'static, Self: Sized,
Optionally provide data to the context with the given data provider. Read more
source§fn from_context<D>(self) -> AddDataOperator<D, Self>where
D: Send + Sync + 'static,
Self: Sized,
fn from_context<D>(self) -> AddDataOperator<D, Self>where D: Send + Sync + 'static, Self: Sized,
👎Deprecated: use
data_from_context
insteadDeclare that the data of type
D
is in the context.source§fn data_from_context<D>(self) -> AddDataOperator<D, Self>where
D: Send + Sync + 'static,
Self: Sized,
fn data_from_context<D>(self) -> AddDataOperator<D, Self>where D: Send + Sync + 'static, Self: Sized,
Declare that the data of type
D
is in the data context.source§impl<I, T> OperatorExt<I> for Twhere
T: Operator<I>,
impl<I, T> OperatorExt<I> for Twhere T: Operator<I>,
source§fn then<P2>(self, other: P2) -> Then<I, Self, P2>where
Self: Sized,
P2: Operator<Self::Output>,
fn then<P2>(self, other: P2) -> Then<I, Self, P2>where Self: Sized, P2: Operator<Self::Output>,
Combine with another operator that uses
Self::Output
as input type. Read moresource§fn facet<P2>(self, other: P2) -> Facet<I, Self, P2>where
Self: Sized,
P2: Operator<I>,
fn facet<P2>(self, other: P2) -> Facet<I, Self, P2>where Self: Sized, P2: Operator<I>,
Combine with another operator with the same input type. Read more
source§fn map<O, F>(self, f: F) -> Then<I, Self, Map<F>>where
Self: Sized,
F: FnMut(Self::Output) -> O,
fn map<O, F>(self, f: F) -> Then<I, Self, Map<F>>where Self: Sized, F: FnMut(Self::Output) -> O,
Map the output after performing the operator.
source§fn boxed<'a>(self) -> BoxOperator<'a, I, Self::Output>where
Self: Sized + Send + 'a,
fn boxed<'a>(self) -> BoxOperator<'a, I, Self::Output>where Self: Sized + Send + 'a,
Convert into a
BoxOperator
.source§fn boxed_local<'a>(self) -> LocalBoxOperator<'a, I, Self::Output>where
Self: Sized + 'a,
fn boxed_local<'a>(self) -> LocalBoxOperator<'a, I, Self::Output>where Self: Sized + 'a,
Convert into a
LocalBoxOperator
.source§fn into_async_operator(self) -> Next<Self>where
Self: Sized,
fn into_async_operator(self) -> Next<Self>where Self: Sized,
Convert into a [
AsyncOperator
].