pub struct ThenOperator<P, F> { /* private fields */ }
Expand description
Operator that used to inspect the context.
Trait Implementations§
Auto Trait Implementations§
impl<P, F> Freeze for ThenOperator<P, F>
impl<P, F> RefUnwindSafe for ThenOperator<P, F>where
P: RefUnwindSafe,
F: RefUnwindSafe,
impl<P, F> Send for ThenOperator<P, F>
impl<P, F> Sync for ThenOperator<P, F>
impl<P, F> Unpin for ThenOperator<P, F>
impl<P, F> UnwindSafe for ThenOperator<P, F>where
P: UnwindSafe,
F: UnwindSafe,
Blanket Implementations§
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>
fn boxed(self) -> BoxContextOperator<In, Self::Out>
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>
fn insert_env<R, Out>(self, f: impl Fn() -> R) -> InsertOperator<Self, R>
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>
fn insert_env_if<R, Out>( self, enable: bool, f: impl Fn() -> R, ) -> Either<InsertOperator<Self, R>, Self>
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>
fn insert<R, Env, Data>( self, f: impl Fn() -> R, ) -> InsertWithDataOperator<Self, R>
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>
fn insert_if<R, Env, Data>( self, enable: bool, f: impl Fn() -> R, ) -> Either<InsertWithDataOperator<Self, R>, Self>
Source§fn inspect<F>(self, f: F) -> InspectOperator<Self, F>
fn inspect<F>(self, f: F) -> InspectOperator<Self, F>
Add an inspect layer with the given closure.
Source§fn provide<D>(self, data: D) -> AddDataOperator<D, Self>
fn provide<D>(self, data: D) -> AddDataOperator<D, Self>
Provide data to the context.
Source§fn provide_if<D>(
self,
data: Option<D>,
) -> Either<AddDataOperator<D, Self>, Self>
fn provide_if<D>( self, data: Option<D>, ) -> Either<AddDataOperator<D, Self>, Self>
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>
fn provide_with<D>( self, provider: impl Fn() -> Option<D> + Send + Sync + 'static, ) -> AddDataOperator<D, Self>
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>
fn provide_with_if<D>( self, enable: bool, provider: impl Fn() -> Option<D> + Send + Sync + 'static, ) -> Either<AddDataOperator<D, Self>, Self>
Optionally provide data to the context with the given data provider. Read more
Source§fn from_context<D>(self) -> AddDataOperator<D, Self>
fn from_context<D>(self) -> AddDataOperator<D, Self>
👎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>
fn data_from_context<D>(self) -> AddDataOperator<D, Self>
Declare that the data of type
D
is in the data context.Source§fn then_with<Out, F, Builder>(self, builder: Builder) -> ThenOperator<Self, F>
fn then_with<Out, F, Builder>(self, builder: Builder) -> ThenOperator<Self, F>
Add a closure that will be called when the inner operator is evaluated.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more