[][src]Struct pluralize::iter::Adder

pub struct Adder<'i, T, P: Pluralize<T>> { /* fields omitted */ }

An Iterator which progressively adds to a collection behind a Pluralize trait. Vectors are added to in stack order using the push() method while Primitives simply return None.

To add to a vector simply call .add( ) on the returned controller, the supplied value will be pushed to the vector at the end of the current iteration.

To end iteration either take no action or .clear( ) the controller if a value was supplied within the last block of iteration.

Methods

impl<'b, T, P: Pluralize<T>> Adder<'b, T, P> where
    T: Pluralize<T>, 
[src]

pub fn new(collection: &'b mut P) -> Self[src]

Prefer the .adder( ) method provided by the PluralizeControlIter trait

Trait Implementations

impl<'b, T: Pluralize<T>> Iterator for Adder<'b, T, Vec<T>>[src]

type Item = Rc<AddController<T>>

The type of the elements being iterated over.

impl<'b, T: Pluralize<T>> Iterator for Adder<'b, T, T>[src]

type Item = Rc<AddController<T>>

The type of the elements being iterated over.

Auto Trait Implementations

impl<'i, T, P> !RefUnwindSafe for Adder<'i, T, P>

impl<'i, T, P> !Send for Adder<'i, T, P>

impl<'i, T, P> !Sync for Adder<'i, T, P>

impl<'i, T, P> Unpin for Adder<'i, T, P>

impl<'i, T, P> !UnwindSafe for Adder<'i, T, P>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.