Struct ExactlyOneError
pub struct ExactlyOneError<I>
where
I: Iterator, { /* private fields */ }
Iterator returned for the error case of Itertools
exactly_one() and
at_most_one().
This iterator yields exactly the same elements as the input iterator.
During the execution of exactly_one the iterator must be mutated. This wrapper
effectively "restores" the state of the input iterator when it's handed back.
This is very similar to PutBackN except this iterator only supports 0-2 elements and does not
use a Vec.
Trait Implementations
impl<I> Clone for ExactlyOneError<I>
where
I: Iterator + Clone,
I::Item: Clone,
fn clone(&self) -> Self
impl<I> Debug for ExactlyOneError<I>
where
I: Iterator + Debug,
I::Item: Debug,
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult
impl<I> Display for ExactlyOneError<I>
where
I: Iterator,
fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult
impl<I> Error for ExactlyOneError<I>
where
I: Iterator + Debug,
I::Item: Debug,
impl<I> ExactSizeIterator for ExactlyOneError<I>
where
I: ExactSizeIterator,
impl<I> Iterator for ExactlyOneError<I>
where
I: Iterator,
type Item = <I as Iterator>::Item;fn next(&mut self) -> Option<Self::Item>fn size_hint(&self) -> (usize, Option<usize>)fn count(self) -> usize where Self: Sized,fn fold<B, F>(self, init: B, f: F) -> B where F: FnMut(B, Self::Item) -> B,