Struct nested_containment_list::Iter[][src]

pub struct Iter<R, T> where
    R: RangeBounds<T>,
    T: Ord
{ /* fields omitted */ }

An Iterator over all elements in a NestedContainmentList.

This Iterator proceeds in a nested fashion, meaning it only yields the outer-most nested elements. To access the inner elements, call sublist() on the outer elements.

Example

use nested_containment_list::NestedContainmentList;
use std::iter::FromIterator;

let nclist = NestedContainmentList::from_iter(vec![1..2]);

let mut iter = nclist.into_iter();
assert_eq!(iter.next().unwrap().value, 1..2);

Trait Implementations

impl<R, T> FusedIterator for Iter<R, T> where
    R: RangeBounds<T>,
    T: Ord
[src]

impl<R, T> Iterator for Iter<R, T> where
    R: RangeBounds<T>,
    T: Ord
[src]

type Item = IterElement<R, T>

The type of the elements being iterated over.

fn next(&mut self) -> Option<Self::Item>[src]

Yield the next outer-most element.

Example

use nested_containment_list::NestedContainmentList;
use std::iter::FromIterator;

let nclist = NestedContainmentList::from_iter(vec![1..2]);

let mut iter = nclist.into_iter();
assert_eq!(iter.next().unwrap().value, 1..2);

Auto Trait Implementations

impl<R, T> Send for Iter<R, T> where
    R: Send,
    T: Send
[src]

impl<R, T> Sync for Iter<R, T> where
    R: Sync,
    T: Sync
[src]

impl<R, T> Unpin for Iter<R, T> where
    R: Unpin,
    T: Unpin
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.