pub struct Then<A, B> { /* private fields */ }Expand description
Two stages run back to back — the output of Then is the composition of its
parts.
Then<A, B> is itself a Stage: it feeds an input through A, then feeds
A’s output through B, and its own Input/Output are A::Input and
B::Output. It is the node Pipeline::then builds, and you rarely name it
directly — a three-stage pipeline has type Pipeline<Then<Then<A, B>, C>>,
assembled for you by chaining .then(...). It is pub only because it appears
in those inferred types.
Composition is monomorphized: dispatch to each stage is a direct, inlinable call with no boxing and no virtual dispatch, so a pipeline of any length is as cheap as calling the stages by hand.
Trait Implementations§
Auto Trait Implementations§
impl<A, B> Freeze for Then<A, B>
impl<A, B> RefUnwindSafe for Then<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Then<A, B>
impl<A, B> Sync for Then<A, B>
impl<A, B> Unpin for Then<A, B>
impl<A, B> UnsafeUnpin for Then<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for Then<A, B>where
A: UnwindSafe,
B: 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