Struct pushgen::generators::SliceGenerator [−][src]
pub struct SliceGenerator<'a, T> { /* fields omitted */ }
Expand description
A generator that generates values from a slice.
Example
let data = [1, 2, 3, 4]; let mut sum = 0; SliceGenerator::new(&data).for_each(|x| sum += x); assert_eq!(sum, 10);
Implementations
Trait Implementations
Auto Trait Implementations
impl<'a, T> RefUnwindSafe for SliceGenerator<'a, T> where
T: RefUnwindSafe,
impl<'a, T> Send for SliceGenerator<'a, T> where
T: Sync,
impl<'a, T> Sync for SliceGenerator<'a, T> where
T: Sync,
impl<'a, T> Unpin for SliceGenerator<'a, T>
impl<'a, T> UnwindSafe for SliceGenerator<'a, T> where
T: RefUnwindSafe,
Blanket Implementations
Mutably borrows from an owned value. Read more