Trait rin::ecs::StreamingIteratorMut[][src]

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

    pub fn next_mut(&mut self) -> Option<&mut Self::Item> { ... }
pub fn fold_mut<B, F>(self, init: B, f: F) -> B
    where
        F: FnMut(B, &mut Self::Item) -> B
, { ... }
pub fn for_each_mut<F>(self, f: F)
    where
        F: FnMut(&mut Self::Item)
, { ... }
pub 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
    F: FnMut(&mut <I as StreamingIterator>::Item) -> B,
    I: StreamingIteratorMut
type Item = B;

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

An interface for dealing with mutable streaming iterators.

Required methods

pub 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

pub 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.

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

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

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

Calls a closure on each mutable element of an iterator.

pub 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
    F: FnMut(&mut <I as StreamingIterator>::Item) -> B,
    I: StreamingIteratorMut
type Item = B;
where
    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.

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

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

Loading content...

Implementations on Foreign Types

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

Loading content...

Implementors

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

impl<A, B> StreamingIteratorMut for Chain<A, B> where
    B: StreamingIteratorMut<Item = <A as StreamingIterator>::Item>,
    A: StreamingIteratorMut
[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
    F: FnMut(&<I as StreamingIterator>::Item) -> Option<B>,
    I: StreamingIterator
[src]

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

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

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

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

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

impl<I, J, F> StreamingIteratorMut for FlatMap<I, J, F> where
    F: FnMut(&<I as StreamingIterator>::Item) -> J,
    I: StreamingIterator,
    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> StreamingIteratorMut for FromFn<T, F> where
    F: FnMut() -> Option<T>, 
[src]

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

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

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

Loading content...