pub struct SumChain<A, B> { /* private fields */ }Expand description
A chain of operations on a coproduct that short-circuits on the left.
Implementations§
Source§impl<A, B> SumChain<A, B>
impl<A, B> SumChain<A, B>
Sourcepub fn map<C>(self, f: impl FnOnce(B) -> C) -> SumChain<A, C>
pub fn map<C>(self, f: impl FnOnce(B) -> C) -> SumChain<A, C>
Map the right side, short-circuiting on the left.
Sourcepub fn flat_map<C>(self, f: impl FnOnce(B) -> Coproduct<A, C>) -> SumChain<A, C>
pub fn flat_map<C>(self, f: impl FnOnce(B) -> Coproduct<A, C>) -> SumChain<A, C>
FlatMap the right side, short-circuiting on the left.
Sourcepub fn into_inner(self) -> Coproduct<A, B>
pub fn into_inner(self) -> Coproduct<A, B>
Unwrap the chain.
Auto Trait Implementations§
impl<A, B> Freeze for SumChain<A, B>
impl<A, B> RefUnwindSafe for SumChain<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for SumChain<A, B>
impl<A, B> Sync for SumChain<A, B>
impl<A, B> Unpin for SumChain<A, B>
impl<A, B> UnsafeUnpin for SumChain<A, B>where
A: UnsafeUnpin,
B: UnsafeUnpin,
impl<A, B> UnwindSafe for SumChain<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