Trait streaming_iterator::StreamingIteratorMut[][src]

pub trait StreamingIteratorMut: StreamingIterator {
    fn get_mut(&mut self) -> Option<&mut Self::Item>;

    fn next_mut(&mut self) -> Option<&mut Self::Item> { ... }
fn fold_mut<B, F>(self, init: B, f: F) -> B
    where
        Self: Sized,
        F: FnMut(B, &mut Self::Item) -> B
, { ... }
fn for_each_mut<F>(self, f: F)
    where
        Self: Sized,
        F: FnMut(&mut Self::Item)
, { ... }
fn map_deref_mut<B, F>(self, f: F) -> MapDerefMut<Self, F>

Notable traits for MapDerefMut<I, F>

impl<I, B, F> Iterator for MapDerefMut<I, F> where
    I: StreamingIteratorMut,
    F: FnMut(&mut I::Item) -> B, 
type Item = B;

    where
        Self: Sized,
        F: FnMut(&mut Self::Item) -> B
, { ... }
fn find_mut<F>(&mut self, f: F) -> Option<&mut Self::Item>
    where
        Self: Sized,
        F: FnMut(&Self::Item) -> bool
, { ... } }

An interface for dealing with mutable streaming iterators.

Required methods

fn get_mut(&mut self) -> Option<&mut Self::Item>[src]

Returns a mutable reference to the current element of the iterator.

The behavior of calling this method before advance has been called is unspecified.

Modifications through this reference may also have an unspecified effect on further iterator advancement, but implementations are encouraged to document this.

Loading content...

Provided methods

fn next_mut(&mut self) -> Option<&mut Self::Item>[src]

Advances the iterator and returns the next mutable value.

The behavior of calling this method after the end of the iterator has been reached is unspecified.

The default implementation simply calls advance followed by get_mut.

fn fold_mut<B, F>(self, init: B, f: F) -> B where
    Self: Sized,
    F: FnMut(B, &mut Self::Item) -> B, 
[src]

Reduces the iterator’s mutable elements to a single, final value.

fn for_each_mut<F>(self, f: F) where
    Self: Sized,
    F: FnMut(&mut Self::Item), 
[src]

Calls a closure on each mutable element of an iterator.

fn map_deref_mut<B, F>(self, f: F) -> MapDerefMut<Self, F>

Notable traits for MapDerefMut<I, F>

impl<I, B, F> Iterator for MapDerefMut<I, F> where
    I: StreamingIteratorMut,
    F: FnMut(&mut I::Item) -> B, 
type Item = B;
where
    Self: Sized,
    F: FnMut(&mut Self::Item) -> B, 
[src]

Creates a regular, non-streaming iterator which transforms mutable elements of this iterator by passing them to a closure.

fn find_mut<F>(&mut self, f: F) -> Option<&mut Self::Item> where
    Self: Sized,
    F: FnMut(&Self::Item) -> bool, 
[src]

Returns a mutable reference to the first element of the iterator that satisfies the predicate.

Loading content...

Implementors

impl<'a, I, T: ?Sized> StreamingIteratorMut for ConvertMut<'a, I, T> where
    I: Iterator<Item = &'a mut T>, 
[src]

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

impl<A, B> StreamingIteratorMut for Chain<A, B> where
    A: StreamingIteratorMut,
    B: StreamingIteratorMut<Item = A::Item>, 
[src]

impl<I> StreamingIteratorMut for Convert<I> where
    I: Iterator
[src]

impl<I> StreamingIteratorMut for Fuse<I> where
    I: StreamingIteratorMut
[src]

impl<I> StreamingIteratorMut for Rev<I> where
    I: DoubleEndedStreamingIteratorMut
[src]

impl<I> StreamingIteratorMut for Skip<I> where
    I: StreamingIteratorMut
[src]

impl<I> StreamingIteratorMut for Take<I> where
    I: StreamingIteratorMut
[src]

impl<I, B, F> StreamingIteratorMut for FilterMap<I, B, F> where
    I: StreamingIterator,
    F: FnMut(&I::Item) -> Option<B>, 
[src]

impl<I, B, F> StreamingIteratorMut for Map<I, B, F> where
    I: StreamingIterator,
    F: FnMut(&I::Item) -> B, 
[src]

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

impl<I, F> StreamingIteratorMut for Inspect<I, F> where
    I: StreamingIteratorMut,
    F: FnMut(&I::Item), 
[src]

impl<I, F> StreamingIteratorMut for SkipWhile<I, F> where
    I: StreamingIteratorMut,
    F: FnMut(&I::Item) -> bool, 
[src]

impl<I, F> StreamingIteratorMut for TakeWhile<I, F> where
    I: StreamingIteratorMut,
    F: FnMut(&I::Item) -> bool, 
[src]

impl<I, J, F> StreamingIteratorMut for FlatMap<I, J, F> where
    I: StreamingIterator,
    F: FnMut(&I::Item) -> J,
    J: StreamingIteratorMut
[src]

impl<T> StreamingIteratorMut for Empty<T>[src]

impl<T> StreamingIteratorMut for Once<T>[src]

impl<T> StreamingIteratorMut for Repeat<T>[src]

impl<T, F: FnMut() -> Option<T>> StreamingIteratorMut for FromFn<T, F>[src]

impl<T, F: FnMut() -> T> StreamingIteratorMut for RepeatWith<T, F>[src]

impl<T, F: FnMut(T) -> Option<T>> StreamingIteratorMut for Successors<T, F>[src]

impl<T, F: FnOnce() -> T> StreamingIteratorMut for OnceWith<T, F>[src]

Loading content...