[][src]Struct prcn_lib::prelude::PutBackN

pub struct PutBackN<I> where
    I: Iterator
{ /* fields omitted */ }

An iterator adaptor that allows putting multiple items in front of the iterator.

Iterator element type is I::Item.

Implementations

impl<I> PutBackN<I> where
    I: Iterator
[src]

pub fn put_back(&mut self, x: <I as Iterator>::Item)[src]

Puts x in front of the iterator. The values are yielded in order of the most recently put back values first.

use itertools::put_back_n;

let mut it = put_back_n(1..5);
it.next();
it.put_back(1);
it.put_back(0);

assert!(itertools::equal(it, 0..5));

Trait Implementations

impl<I> Clone for PutBackN<I> where
    I: Clone + Iterator,
    <I as Iterator>::Item: Clone
[src]

impl<I> Debug for PutBackN<I> where
    I: Iterator + Debug,
    <I as Iterator>::Item: Debug
[src]

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

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

impl<I> PeekingNext for PutBackN<I> where
    I: Iterator
[src]

Auto Trait Implementations

impl<I> RefUnwindSafe for PutBackN<I> where
    I: RefUnwindSafe,
    <I as Iterator>::Item: RefUnwindSafe

impl<I> Send for PutBackN<I> where
    I: Send,
    <I as Iterator>::Item: Send

impl<I> Sync for PutBackN<I> where
    I: Sync,
    <I as Iterator>::Item: Sync

impl<I> Unpin for PutBackN<I> where
    I: Unpin,
    <I as Iterator>::Item: Unpin

impl<I> UnwindSafe for PutBackN<I> where
    I: UnwindSafe,
    <I as Iterator>::Item: UnwindSafe

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<N, E, I> ElementIterator<N, E> for I where
    I: Iterator<Item = Element<N, E>> + ?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<I> IteratorRandom for I where
    I: Iterator
[src]

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<I> ItertoolsNum for I where
    I: Iterator + ?Sized
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,