Function rin::ecs::streaming_iterator::once [−][src]
pub fn once<T>(item: T) -> Once<T>
Creates an iterator that returns exactly one item.
let mut streaming_iter = streaming_iterator::once(1); assert_eq!(streaming_iter.next(), Some(&1)); assert_eq!(streaming_iter.next(), None);