Struct itertools::PutBack
[−]
[src]
pub struct PutBack<I> where I: Iterator {
// some fields omitted
}An iterator adaptor that allows putting back a single item to the front of the iterator.
Iterator element type is I::Item.
Methods
impl<I> PutBack<I> where I: Iterator
fn new(it: I) -> Self
Iterator element type is A
fn with_value(value: I::Item, it: I) -> Self
Create a PutBack along with the value to put back.
fn into_parts(self) -> (Option<I::Item>, I)
Split the PutBack into its parts.
fn put_back(&mut self, x: I::Item)
Put back a single value to the front of the iterator.
If a value is already in the put back slot, it is overwritten.