[][src]Struct collect_result::SizeHintedIter

pub struct SizeHintedIter<I> {
    pub lower: usize,
    pub upper: Option<usize>,
    // some fields omitted
}

Used to override the output of Iterator::size_hint of an iterator

Fields

lower: usize

The lower bound to pretend to have

upper: Option<usize>

The upper bound to pretend to have

Implementations

impl<I: Iterator> SizeHintedIter<I>[src]

pub fn new(inner: I) -> Self[src]

Sets the bounds from the given iterator's Iterator::size_hint.

impl<I> SizeHintedIter<I>[src]

pub fn with_bounds(inner: I, lower: usize, upper: Option<usize>) -> Self[src]

Sets the bounds to the given arguments

pub fn into_inner(self) -> I[src]

Turns self into the inner iterator

Trait Implementations

impl<I: Clone> Clone for SizeHintedIter<I>[src]

impl<I: Copy> Copy for SizeHintedIter<I>[src]

impl<I: Debug> Debug for SizeHintedIter<I>[src]

impl<I: Eq> Eq for SizeHintedIter<I>[src]

impl<I: Iterator> Iterator for SizeHintedIter<I>[src]

type Item = I::Item

The type of the elements being iterated over.

impl<I: PartialEq> PartialEq<SizeHintedIter<I>> for SizeHintedIter<I>[src]

impl<I> StructuralEq for SizeHintedIter<I>[src]

impl<I> StructuralPartialEq for SizeHintedIter<I>[src]

Auto Trait Implementations

impl<I> RefUnwindSafe for SizeHintedIter<I> where
    I: RefUnwindSafe

impl<I> Send for SizeHintedIter<I> where
    I: Send

impl<I> Sync for SizeHintedIter<I> where
    I: Sync

impl<I> Unpin for SizeHintedIter<I> where
    I: Unpin

impl<I> UnwindSafe for SizeHintedIter<I> where
    I: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, E, I> CollectResult<T, E> for I where
    I: Iterator<Item = Result<T, E>>, 
[src]

fn collect_result<O>(Self) -> Result<O, E> where
    O: FromIterator<T> + Extend<T>, 
[src]

Takes an iterator of results and tries to collect all Oks from it

Returns the Err if an item is ever Err short-circuting. That is, it will immediately return the error when it encounters the first one.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.