pub struct IterChoice<I> { /* private fields */ }Expand description
A choice between filterning eithers by branch.
Implementations§
Source§impl<I> IterChoice<I>
impl<I> IterChoice<I>
pub fn new(iter: I) -> IterChoice<I>
Trait Implementations§
Source§impl<I: Clone> Clone for IterChoice<I>
impl<I: Clone> Clone for IterChoice<I>
Source§fn clone(&self) -> IterChoice<I>
fn clone(&self) -> IterChoice<I>
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<I: Debug> Debug for IterChoice<I>
impl<I: Debug> Debug for IterChoice<I>
Source§impl<I: Iterator<Item = Either<A, B>>, A, B> DynChoice for IterChoice<I>
impl<I: Iterator<Item = Either<A, B>>, A, B> DynChoice for IterChoice<I>
Source§fn into_left(self: Box<Self>) -> LeftFilterIter<I, A, B> ⓘ
fn into_left(self: Box<Self>) -> LeftFilterIter<I, A, B> ⓘ
Creates an iterator that filters for left.
Source§fn into_right(self: Box<Self>) -> RightFilterIter<I, A, B> ⓘ
fn into_right(self: Box<Self>) -> RightFilterIter<I, A, B> ⓘ
Creates an iterator that filters for right.
type Left = LeftFilterIter<I, A, B>
type Right = RightFilterIter<I, A, B>
Source§impl<I: Hash> Hash for IterChoice<I>
impl<I: Hash> Hash for IterChoice<I>
Source§impl<I: Ord> Ord for IterChoice<I>
impl<I: Ord> Ord for IterChoice<I>
Source§fn cmp(&self, other: &IterChoice<I>) -> Ordering
fn cmp(&self, other: &IterChoice<I>) -> 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<I: PartialEq> PartialEq for IterChoice<I>
impl<I: PartialEq> PartialEq for IterChoice<I>
Source§impl<I: PartialOrd> PartialOrd for IterChoice<I>
impl<I: PartialOrd> PartialOrd for IterChoice<I>
impl<I: Copy> Copy for IterChoice<I>
impl<I: Eq> Eq for IterChoice<I>
impl<I> StructuralPartialEq for IterChoice<I>
Auto Trait Implementations§
impl<I> Freeze for IterChoice<I>where
I: Freeze,
impl<I> RefUnwindSafe for IterChoice<I>where
I: RefUnwindSafe,
impl<I> Send for IterChoice<I>where
I: Send,
impl<I> Sync for IterChoice<I>where
I: Sync,
impl<I> Unpin for IterChoice<I>where
I: Unpin,
impl<I> UnwindSafe for IterChoice<I>where
I: 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