Function rin::ecs::streaming_iterator::convert_ref[][src]

pub fn convert_ref<'a, I, T>(
    iterator: I
) -> ConvertRef<'a, <I as IntoIterator>::IntoIter, T> where
    T: ?Sized,
    I: IntoIterator<Item = &'a T>, 

Turns an iterator of references into a streaming iterator.

let scores = vec![100, 50, 80];
let mut streaming_iter = convert_ref(&scores);
while let Some(score) = streaming_iter.next() {
    println!("The score is: {}", score);
}