pub trait ResultPeek<T, E>: Peek + Iterator<Item = Result<T, E>> {
    // Required method
    fn peek_result(&mut self) -> Result<&T, E>;
}
Expand description

Same as ResultNext but for things that implement Peek.

This trait is automatically implemented for any iterator of Results that has an error type E such that &E: From<UnexpectedEnd>.

Required Methods§

source

fn peek_result(&mut self) -> Result<&T, E>

See next_result.

§Errors

Should return Err if the underlying item is an Err, or there are no more items in the iterator.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<T, E, U: Peek + Iterator<Item = Result<T, E>>> ResultPeek<T, E> for U
where for<'a> E: From<UnexpectedEnd> + Clone + 'a,