[][src]Trait heim_common::utils::iter::TryIterator

pub trait TryIterator: Iterator {
    fn try_next(&mut self) -> Result<Self::Item>;
fn try_from_next<R, E>(&mut self) -> Result<R>
    where
        R: TryFrom<Self::Item, Error = E>,
        Error: From<E>
; }

Extension trait for all T: Iterator.

Used across the heim sub-crates only.

Required methods

fn try_next(&mut self) -> Result<Self::Item>

Attempt to fetch next element from iterator, but instead of returning Option<T> returns Result<T>.

fn try_from_next<R, E>(&mut self) -> Result<R> where
    R: TryFrom<Self::Item, Error = E>,
    Error: From<E>, 

Attempt to fetch next element from iterator and try to convert it into R type.

Type R should implement TryFrom<Iterator::Item>.

Loading content...

Implementors

impl<T> TryIterator for T where
    T: Iterator
[src]

Loading content...