pub struct BoxedChoice<C: ?Sized> { /* private fields */ }Expand description
Stores a DynChoice with indirection so that Choice can be implemented
Implementations§
Source§impl<C: ?Sized> BoxedChoice<C>
impl<C: ?Sized> BoxedChoice<C>
pub fn new(choice: Box<C>) -> BoxedChoice<C>
Trait Implementations§
Source§impl<C: Clone + ?Sized> Clone for BoxedChoice<C>
impl<C: Clone + ?Sized> Clone for BoxedChoice<C>
Source§fn clone(&self) -> BoxedChoice<C>
fn clone(&self) -> BoxedChoice<C>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<C: Ord + ?Sized> Ord for BoxedChoice<C>
impl<C: Ord + ?Sized> Ord for BoxedChoice<C>
Source§fn cmp(&self, other: &BoxedChoice<C>) -> Ordering
fn cmp(&self, other: &BoxedChoice<C>) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<C: PartialOrd + ?Sized> PartialOrd for BoxedChoice<C>
impl<C: PartialOrd + ?Sized> PartialOrd for BoxedChoice<C>
impl<C: Eq + ?Sized> Eq for BoxedChoice<C>
impl<C: ?Sized> StructuralPartialEq for BoxedChoice<C>
Auto Trait Implementations§
impl<C> Freeze for BoxedChoice<C>where
C: ?Sized,
impl<C> RefUnwindSafe for BoxedChoice<C>where
C: RefUnwindSafe + ?Sized,
impl<C> Send for BoxedChoice<C>
impl<C> Sync for BoxedChoice<C>
impl<C> Unpin for BoxedChoice<C>where
C: ?Sized,
impl<C> UnwindSafe for BoxedChoice<C>where
C: UnwindSafe + ?Sized,
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