[−][src]Trait backtracking_iterator::Record
A historical record representation
Associated Types
type RefPoint
The type used to refer to positions in the history
Required methods
fn get_ref_point(&self) -> Self::RefPoint
Yield a reference to the current point in the history This reference must be valid for as long as the current point remains in the history
fn forget_before(&mut self, point: Self::RefPoint)
Eliminate all the values before the given reference point from the history
Provided methods
fn forget(&mut self)
Forget all the values before the current position in the iterator
extern crate backtracking_iterator; use backtracking_iterator::{Record, BacktrackingIterator}; let v = vec![1_u8, 2_u8]; let mut rec = backtracking_iterator::BacktrackingRecorder::new(v.into_iter()); { let mut bt = rec.copying(); bt.next(); } //Before we call this, 1_u8 is in the history rec.forget(); { let mut bt = rec.copying(); assert!(bt.next().unwrap() == 2_u8); }
Implementors
impl<Iter> Record for BacktrackingRecorder<Iter> where
Iter: Iterator,
[src]
Iter: Iterator,