Trait wagon_utils::ResultPeek
source · 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 Result
s that has an error type E
such that &E: From<UnexpectedEnd>
.
Required Methods§
sourcefn peek_result(&mut self) -> Result<&T, E>
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.