fullypeek 0.1.0

Peek forward in an iterator as far as you'd like, memory allowing!
Documentation
  • Coverage
  • 100%
    13 out of 13 items documented0 out of 12 items with examples
  • Size
  • Source code size: 2.32 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.54 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Documentation
  • clintval/fullypeek
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • clintval

fullypeek

Build Status Coverage Status Language

Peek forward in an iterator as far as you'd like, memory allowing!

El Chorro, Spain

let mut peekable = vec![1, 2, 3].into_iter().fully_peekable();

assert_eq!(peekable.peek(), Some(&1));
assert_eq!(peekable.peek_many(2), vec!(Some(&1), Some(&2)));

peekable.next();

assert_eq!(peekable.peek(), Some(&2));
assert_eq!(peekable.peek_many(2), vec!(Some(&2), Some(&3)));

peekable.next();

assert_eq!(peekable.peek(), Some(&3));
assert_eq!(peekable.peek_many(2), vec!(Some(&3), None));