fallible_iterator

Trait DoubleEndedFallibleIterator

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

    // 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> { ... }
    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> { ... }
}
Expand description

A fallible iterator able to yield elements from both ends.

Required Methods§

Source

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

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

Provided Methods§

Source

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.

Source

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.

Implementations on Foreign Types§

Source§

impl<I: DoubleEndedFallibleIterator + ?Sized> DoubleEndedFallibleIterator for &mut I

Source§

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

Source§

impl<I: DoubleEndedFallibleIterator + ?Sized> DoubleEndedFallibleIterator for Box<I>

Source§

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

Implementors§