[][src]Trait fallible_iterator::DoubleEndedFallibleIterator

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

    fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error>
    where
        Self: Sized,
        F: FnMut(B, Self::Item) -> Result<B, Self::Error>
, { ... }
fn try_rfold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E>
    where
        Self: Sized,
        E: From<Self::Error>,
        F: FnMut(B, Self::Item) -> Result<B, E>
, { ... } }

A fallible iterator able to yield elements from both ends.

Required methods

fn next_back(&mut self) -> Result<Option<Self::Item>, Self::Error>

Advances the end of the iterator, returning the last value.

Loading content...

Provided methods

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 

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

fn try_rfold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E> where
    Self: Sized,
    E: From<Self::Error>,
    F: FnMut(B, Self::Item) -> Result<B, E>, 

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

This is used as the "base" of many methods on DoubleEndedFallibleIterator.

Loading content...

Implementations on Foreign Types

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

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

fn try_rfold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E> where
    Self: Sized,
    E: From<Self::Error>,
    F: FnMut(B, Self::Item) -> Result<B, E>, 
[src]

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

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

fn try_rfold<B, E, F>(&mut self, init: B, f: F) -> Result<B, E> where
    Self: Sized,
    E: From<Self::Error>,
    F: FnMut(B, Self::Item) -> Result<B, E>, 
[src]

Loading content...

Implementors

impl<'a, T, I> DoubleEndedFallibleIterator for Cloned<I> where
    I: DoubleEndedFallibleIterator<Item = &'a T>,
    T: 'a + Clone
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<B, F, I> DoubleEndedFallibleIterator for Map<I, F> where
    I: DoubleEndedFallibleIterator,
    F: FnMut(I::Item) -> Result<B, I::Error>, 
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<B, F, I> DoubleEndedFallibleIterator for MapErr<I, F> where
    I: DoubleEndedFallibleIterator,
    F: FnMut(I::Error) -> B, 
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<B, I, F> DoubleEndedFallibleIterator for FilterMap<I, F> where
    I: DoubleEndedFallibleIterator,
    F: FnMut(I::Item) -> Result<Option<B>, I::Error>, 
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<I> DoubleEndedFallibleIterator for Rev<I> where
    I: DoubleEndedFallibleIterator
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<I, F> DoubleEndedFallibleIterator for Filter<I, F> where
    I: DoubleEndedFallibleIterator,
    F: FnMut(&I::Item) -> Result<bool, I::Error>, 
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<I, F> DoubleEndedFallibleIterator for Inspect<I, F> where
    I: DoubleEndedFallibleIterator,
    F: FnMut(&I::Item) -> Result<(), I::Error>, 
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<T, E, I> DoubleEndedFallibleIterator for Convert<I> where
    I: DoubleEndedIterator<Item = Result<T, E>>, 
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

impl<T, U> DoubleEndedFallibleIterator for Chain<T, U> where
    T: DoubleEndedFallibleIterator,
    U: DoubleEndedFallibleIterator<Item = T::Item, Error = T::Error>, 
[src]

fn rfold<B, F>(self, init: B, f: F) -> Result<B, Self::Error> where
    Self: Sized,
    F: FnMut(B, Self::Item) -> Result<B, Self::Error>, 
[src]

Loading content...