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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.