pub struct AndThen<First, Second> { /* private fields */ }Expand description
Type-chained sequence: feed input through first, then feed the
intermediate through second. The type system enforces
first::Out = second::In; the error channel is bridged by
Second::Err: From<First::Err> (thiserror #[from] chains supply the
impls). This is the composition law of the form family — the only operator
the backport lands at G2; Race/Tee/Quorum follow when a use case asks.
AndThen is itself a Pipe (and a SendPipe when both stages are), so
chains nest: AndThen::new(a, AndThen::new(b, c)).
Implementations§
Trait Implementations§
impl<First: AllocFree, Second: AllocFree> AllocFree for AndThen<First, Second>
impl<First: Commutative, Second: Commutative> Commutative for AndThen<First, Second>
impl<First: Copy, Second: Copy> Copy for AndThen<First, Second>
impl<First: Deterministic, Second: Deterministic> Deterministic for AndThen<First, Second>
impl<First: DropSafe, Second: DropSafe> DropSafe for AndThen<First, Second>
impl<First: IdempotentSideEffectFree, Second: IdempotentSideEffectFree> IdempotentSideEffectFree for AndThen<First, Second>
impl<First: IsPure, Second: IsPure> IsPure for AndThen<First, Second>
impl<First: NoStd, Second: NoStd> NoStd for AndThen<First, Second>
impl<First: Reproducible, Second: Reproducible> Reproducible for AndThen<First, Second>
Source§impl<First, Second> SendPipe for AndThen<First, Second>
impl<First, Second> SendPipe for AndThen<First, Second>
Source§impl<First, Second> UnpinSendPipe for AndThen<First, Second>
impl<First, Second> UnpinSendPipe for AndThen<First, Second>
Source§type In = <First as UnpinSendPipe>::In
type In = <First as UnpinSendPipe>::In
Input the pipe consumes.
Source§type Out = <Second as UnpinSendPipe>::Out
type Out = <Second as UnpinSendPipe>::Out
Output the pipe produces.
Source§type Err = <Second as UnpinSendPipe>::Err
type Err = <Second as UnpinSendPipe>::Err
Error the pipe can fail with —
Send here so it can cross cores.impl<First: WithoutFilesystem, Second: WithoutFilesystem> WithoutFilesystem for AndThen<First, Second>
impl<First: WithoutNetwork, Second: WithoutNetwork> WithoutNetwork for AndThen<First, Second>
impl<First: WithoutRandom, Second: WithoutRandom> WithoutRandom for AndThen<First, Second>
impl<First: WithoutSpawn, Second: WithoutSpawn> WithoutSpawn for AndThen<First, Second>
impl<First: WithoutTime, Second: WithoutTime> WithoutTime for AndThen<First, Second>
Auto Trait Implementations§
impl<First, Second> Freeze for AndThen<First, Second>
impl<First, Second> RefUnwindSafe for AndThen<First, Second>where
First: RefUnwindSafe,
Second: RefUnwindSafe,
impl<First, Second> Send for AndThen<First, Second>
impl<First, Second> Sync for AndThen<First, Second>
impl<First, Second> Unpin for AndThen<First, Second>
impl<First, Second> UnsafeUnpin for AndThen<First, Second>where
First: UnsafeUnpin,
Second: UnsafeUnpin,
impl<First, Second> UnwindSafe for AndThen<First, Second>where
First: UnwindSafe,
Second: 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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<Implementor> Handler for Implementor
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<P> PipeExt for Pwhere
P: Pipe,
impl<P> PipeExt for Pwhere
P: Pipe,
Source§fn and_then<Next>(self, next: Next) -> AndThen<Self, Next>
fn and_then<Next>(self, next: Next) -> AndThen<Self, Next>
self.and_then(next) is AndThen::new(self, next) — reads
left-to-right at the call site.Source§fn fanout(self, other: Self) -> FanOut<Self, AllOrNothing>
fn fanout(self, other: Self) -> FanOut<Self, AllOrNothing>
Broadcast to
self and other, all-or-nothing.Source§impl<S> PollSourceExt for S
impl<S> PollSourceExt for S
Source§fn into_stream(self) -> AsStream<Self>
fn into_stream(self) -> AsStream<Self>
Owns
self, wrapping it as a futures::Stream.