Trait argparse::slide::Slider
[−]
[src]
pub trait Slider<'a, T: Sized> { fn slide(&'a self) -> Slide<'a, T>; }
Interface for all types that can produce a Slide
iterator
Required Methods
fn slide(&'a self) -> Slide<'a, T>
Calling this method shall produce a Slide
iterator
Example
use argparse::slide::{Slide, Slider}; let v = vec![1, 2, 3, 4, 5]; for (x, opt_rest) in v.slide() { if let Some(rest) = opt_rest { println!("{}", x + rest[0]) // rest guaranteed at least 1 element } }