Trait fallible_iterator::FallibleIterator [] [src]

pub trait FallibleIterator {
    type Item;
    type Error;
    fn next(&mut self) -> Result<Option<Self::Item>, Self::Error>;

    fn size_hint(&self) -> (usize, Option<usize>) { ... }
fn all<F>(&mut self, f: F) -> Result<bool, Self::Error>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> bool
, { ... }
fn and_then<F, B>(self, f: F) -> AndThen<Self, F>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> Result<B, Self::Error>
, { ... }
fn any<F>(&mut self, f: F) -> Result<bool, Self::Error>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> bool
, { ... }
fn by_ref(&mut self) -> &mut Self
    where
        Self: Sized
, { ... }
fn chain<I>(self, it: I) -> Chain<Self, I>
    where
        I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
        Self: Sized
, { ... }
fn cloned<'a, T>(self) -> Cloned<Self>
    where
        Self: Sized + FallibleIterator<Item = &'a T>,
        T: 'a + Clone
, { ... }
fn count(self) -> Result<usize, Self::Error>
    where
        Self: Sized
, { ... }
fn collect<T>(self) -> Result<T, Self::Error>
    where
        T: FromFallibleIterator<Self::Item>,
        Self: Sized
, { ... }
fn enumerate(self) -> Enumerate<Self>
    where
        Self: Sized
, { ... }
fn filter<F>(self, f: F) -> Filter<Self, F>
    where
        Self: Sized,
        F: FnMut(&Self::Item) -> bool
, { ... }
fn filter_map<B, F>(self, f: F) -> FilterMap<Self, F>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> Option<B>
, { ... }
fn find<F>(&mut self, f: F) -> Result<Option<Self::Item>, Self::Error>
    where
        Self: Sized,
        F: FnMut(&Self::Item) -> bool
, { ... }
fn fuse(self) -> Fuse<Self>
    where
        Self: Sized
, { ... }
fn fold<B, F>(self, init: B, f: F) -> Result<B, Self::Error>
    where
        Self: Sized,
        F: FnMut(B, Self::Item) -> B
, { ... }
fn iterator(self) -> Iterator<Self>
    where
        Self: Sized
, { ... }
fn last(self) -> Result<Option<Self::Item>, Self::Error>
    where
        Self: Sized
, { ... }
fn map<B, F>(self, f: F) -> Map<Self, F>
    where
        F: FnMut(Self::Item) -> B,
        Self: Sized
, { ... }
fn map_err<B, F>(self, f: F) -> MapErr<Self, F>
    where
        F: FnMut(Self::Error) -> B,
        Self: Sized
, { ... }
fn max(self) -> Result<Option<Self::Item>, Self::Error>
    where
        Self: Sized,
        Self::Item: Ord
, { ... }
fn max_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error>
    where
        Self: Sized,
        B: Ord,
        F: FnMut(&Self::Item) -> B
, { ... }
fn min(self) -> Result<Option<Self::Item>, Self::Error>
    where
        Self: Sized,
        Self::Item: Ord
, { ... }
fn min_by_key<B, F>(self, f: F) -> Result<Option<Self::Item>, Self::Error>
    where
        Self: Sized,
        B: Ord,
        F: FnMut(&Self::Item) -> B
, { ... }
fn nth(&mut self, n: usize) -> Result<Option<Self::Item>, Self::Error> { ... }
fn peekable(self) -> Peekable<Self>
    where
        Self: Sized
, { ... }
fn position<F>(&mut self, f: F) -> Result<Option<usize>, Self::Error>
    where
        Self: Sized,
        F: FnMut(Self::Item) -> bool
, { ... }
fn rev(self) -> Rev<Self>
    where
        Self: Sized + DoubleEndedFallibleIterator
, { ... }
fn take(self, n: usize) -> Take<Self>
    where
        Self: Sized
, { ... }
fn zip<I>(self, o: I) -> Zip<Self, I::IntoIter>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>
, { ... }
fn cmp<I>(self, other: I) -> Result<Ordering, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Item = Self::Item, Error = Self::Error>,
        Self::Item: Ord
, { ... }
fn partial_cmp<I>(self, other: I) -> Result<Option<Ordering>, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>,
        Self::Item: PartialOrd<I::Item>
, { ... }
fn eq<I>(self, other: I) -> Result<bool, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>,
        Self::Item: PartialEq<I::Item>
, { ... }
fn ne<I>(self, other: I) -> Result<bool, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>,
        Self::Item: PartialEq<I::Item>
, { ... }
fn lt<I>(self, other: I) -> Result<bool, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>,
        Self::Item: PartialOrd<I::Item>
, { ... }
fn le<I>(self, other: I) -> Result<bool, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>,
        Self::Item: PartialOrd<I::Item>
, { ... }
fn gt<I>(self, other: I) -> Result<bool, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>,
        Self::Item: PartialOrd<I::Item>
, { ... }
fn ge<I>(self, other: I) -> Result<bool, Self::Error>
    where
        Self: Sized,
        I: IntoFallibleIterator<Error = Self::Error>,
        Self::Item: PartialOrd<I::Item>
, { ... } }

An Iterator-like trait that allows for calculation of items to fail.

Associated Types

The type being iterated over.

The error type.

Required Methods

Advances the iterator and returns the next value.

Returns Ok(None) when iteration is finished.

The behavior of calling this method after a previous call has returned Ok(None) or Err is implemenetation defined.

Provided Methods

Returns bounds on the remaining length of the iterator.

Specifically, the first half of the returned tuple is a lower bound and the second half is an upper bound.

For the upper bound, None indicates that the upper bound is either unknown or larger than can be represented as a usize.

Both bounds assume that all remaining calls to next succeed. That is, next could return an Err in fewer calls than specified by the lower bound.

The default implementation returns (0, None), which is correct for any iterator.

Determines if all elements of this iterator match a predicate.

Returns an iterator which applies a fallible transform to the elements of the underlying iterator.

Determines if any element of this iterator matches a predicate.

Borrow an iterator rather than consuming it.

This is useful to allow the use of iterator adaptors that would otherwise consume the value.

Returns an iterator which yields the elements of this iterator followed by another.

Returns an iterator which clones all of its elements.

Consumes the iterator, returning the number of remaining items.

Transforms the iterator into a collection.

An Err will be returned if any invocation of next returns Err.

Returns an iterator which yields the current iteration count as well as the value.

Returns an iterator which uses a predicate to determine which values should be yielded.

Returns an iterator which both filters and maps.

Returns the first element of the iterator that matches a predicate.

Returns an iterator which yields this iterator's elements and ends after the first Ok(None).

The behavior of calling next after it has previously returned Ok(None) is normally unspecified. The iterator returned by this method guarantees that Ok(None) will always be returned.

Applies a function over the elements of the iterator, producing a single final value.

Returns a normal (non-fallible) iterator over Result<Item, Error>.

Returns the last element of the iterator.

Returns an iterator which applies a transform to the elements of the underlying iterator.

Returns an iterator which applies a transform to the errors of the underlying iterator.

Returns the maximal element of the iterator.

Returns the element of the iterator which gives the maximum value from the function.

Returns the minimal element of the iterator.

Returns the element of the iterator which gives the minimum value from the function.

Returns the nth element of the iterator.

Returns an iterator that can peek at the next element without consuming it.

Returns the position of the first element of this iterator that matches a predicate.

Returns an iterator that yields this iterator's items in the opposite order.

Returns an iterator that yields only the first n values of this iterator.

Returns an iterator that yields pairs of this iterator's and another iterator's values.

Lexicographically compares the elements of this iterator to that of another.

Lexicographically compares the elements of this iterator to that of another.

Determines if the elements of this iterator are equal to those of another.

Determines if the elements of this iterator are not equal to those of another.

Determines if the elements of this iterator are lexicographically less than those of another.

Determines if the elements of this iterator are lexicographically less than or equal to those of another.

Determines if the elements of this iterator are lexicographically greater than those of another.

Determines if the elements of this iterator are lexicographically greater than or equal to those of another.

Implementations on Foreign Types

impl<'a, I: FallibleIterator + ?Sized> FallibleIterator for &'a mut I
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

impl<I: FallibleIterator + ?Sized> FallibleIterator for Box<I>
[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

[src]

Implementors