pub trait IntoPopulatedIterator: IntoIterator {
type PopulatedIntoIter: PopulatedIterator<Item = <Self as IntoIterator>::Item, IntoIter = <Self as IntoIterator>::IntoIter>;
// Required method
fn into_populated_iter(self) -> Self::PopulatedIntoIter;
}Expand description
Conversion into a PopulatedIterator.
This trait is used to convert a type into a PopulatedIterator.
§Examples
use populated::{PopulatedVecDeque, IntoPopulatedIterator, PopulatedIterator};
let mut vec_deque = PopulatedVecDeque::new(1);
vec_deque.push_back(2);
vec_deque.push_back(3);
let populated_iter = vec_deque.into_populated_iter();
let (first, iter) = populated_iter.next();
assert_eq!(first, 1);
assert_eq!(iter.collect::<Vec<_>>(), [2, 3]);Required Associated Types§
type PopulatedIntoIter: PopulatedIterator<Item = <Self as IntoIterator>::Item, IntoIter = <Self as IntoIterator>::IntoIter>
Required Methods§
Sourcefn into_populated_iter(self) -> Self::PopulatedIntoIter
fn into_populated_iter(self) -> Self::PopulatedIntoIter
Converts the type into a PopulatedIterator.