pub struct SelectCombinator<E, A, B> {
pub lhs: OxiEither<A, E>,
pub rhs: OxiEither<Box<dyn Fn(A) -> B>, E>,
}Expand description
The select combinator for Either, implementing Selective behaviour.
select runs a computation that may short-circuit or choose between two
branches. Given OxiEither<A, E> (lhs) and OxiEither<Box<dyn Fn(A) -> B>, E> (rhs),
it applies the function when lhs is Left(a), otherwise short-circuits.
Fields§
§lhs: OxiEither<A, E>The left-or-value argument.
rhs: OxiEither<Box<dyn Fn(A) -> B>, E>The function-or-error argument.
Implementations§
Auto Trait Implementations§
impl<E, A, B> Freeze for SelectCombinator<E, A, B>
impl<E, A, B> !RefUnwindSafe for SelectCombinator<E, A, B>
impl<E, A, B> !Send for SelectCombinator<E, A, B>
impl<E, A, B> !Sync for SelectCombinator<E, A, B>
impl<E, A, B> Unpin for SelectCombinator<E, A, B>
impl<E, A, B> UnsafeUnpin for SelectCombinator<E, A, B>where
A: UnsafeUnpin,
E: UnsafeUnpin,
impl<E, A, B> !UnwindSafe for SelectCombinator<E, A, B>
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