pub struct Both<A, B> { /* private fields */ }Expand description
A choice with both branches already inhabited.
Implementations§
Trait Implementations§
impl<A: Copy, B: Copy> Copy for Both<A, B>
impl<A: Eq, B: Eq> Eq for Both<A, B>
impl<A, B> StructuralPartialEq for Both<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Both<A, B>
impl<A, B> RefUnwindSafe for Both<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Both<A, B>
impl<A, B> Sync for Both<A, B>
impl<A, B> Unpin for Both<A, B>
impl<A, B> UnwindSafe for Both<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
Source§impl<T> Choice for Twhere
T: DynChoice,
impl<T> Choice for Twhere
T: DynChoice,
Source§fn map_left<C, F: FnOnce(Self::Left) -> C>(
self,
left: F,
) -> ChooseMap<Self, Both<F, fn(Self::Right) -> Self::Right>>
fn map_left<C, F: FnOnce(Self::Left) -> C>( self, left: F, ) -> ChooseMap<Self, Both<F, fn(Self::Right) -> Self::Right>>
Maps the left value. Read more
Source§fn map_right<C, G: FnOnce(Self::Right) -> C>(
self,
right: G,
) -> ChooseMap<Self, Both<fn(Self::Left) -> Self::Left, G>>
fn map_right<C, G: FnOnce(Self::Right) -> C>( self, right: G, ) -> ChooseMap<Self, Both<fn(Self::Left) -> Self::Left, G>>
Maps the right value. Read more
Source§fn map_both<C, D, F: FnOnce(Self::Left) -> C, G: FnOnce(Self::Right) -> D>(
self,
left: F,
right: G,
) -> ChooseMap<Self, Both<F, G>>
fn map_both<C, D, F: FnOnce(Self::Left) -> C, G: FnOnce(Self::Right) -> D>( self, left: F, right: G, ) -> ChooseMap<Self, Both<F, G>>
Maps both values. Read more
Source§fn choose_map<T: Choice, C, D>(self, choice: T) -> ChooseMap<Self, T>
fn choose_map<T: Choice, C, D>(self, choice: T) -> ChooseMap<Self, T>
Composes a choice of values with a choice of functions to produce a choice of values. Read more
Source§fn cobind_left<C, F: FnOnce(Self) -> C>(self, left: F) -> LeftCoBind<Self, F>
fn cobind_left<C, F: FnOnce(Self) -> C>(self, left: F) -> LeftCoBind<Self, F>
Sets the left value to a map from the current state to be ran if chosen. Read more
Source§fn cobind_right<C, G: FnOnce(Self) -> C>(self, right: G) -> RightCoBind<Self, G>
fn cobind_right<C, G: FnOnce(Self) -> C>(self, right: G) -> RightCoBind<Self, G>
Sets the right value to a map from the current state to be ran if chosen. Read more