pub struct Eh<L: Loss> { /* private fields */ }Expand description
Terni-functor composition context.
Accumulates loss across a sequence of Imperfect operations,
converting each to Result for use with ?.
Call .finish() to wrap the final value with accumulated loss.
Implementations§
Source§impl<L: Loss> Eh<L>
impl<L: Loss> Eh<L>
Sourcepub fn eh<T, E>(&mut self, imp: Imperfect<T, E, L>) -> Result<T, E>
pub fn eh<T, E>(&mut self, imp: Imperfect<T, E, L>) -> Result<T, E>
Extract value from Imperfect, accumulating loss.
Returns Result<T, E> for use with ?.
Sourcepub fn imp<T, E>(&mut self, imp: Imperfect<T, E, L>) -> Result<T, E>
pub fn imp<T, E>(&mut self, imp: Imperfect<T, E, L>) -> Result<T, E>
Alias for eh. The name. For the mischievous ones.
Trait Implementations§
Auto Trait Implementations§
impl<L> Freeze for Eh<L>where
L: Freeze,
impl<L> RefUnwindSafe for Eh<L>where
L: RefUnwindSafe,
impl<L> Send for Eh<L>where
L: Send,
impl<L> Sync for Eh<L>where
L: Sync,
impl<L> Unpin for Eh<L>where
L: Unpin,
impl<L> UnsafeUnpin for Eh<L>where
L: UnsafeUnpin,
impl<L> UnwindSafe for Eh<L>where
L: 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