Struct futures_util::stream::Recover [−][src]
#[must_use = "streams do nothing unless polled"]pub struct Recover<A, E, F> { /* fields omitted */ }
Future for the recover
combinator, handling errors by converting them into
an Option<Item>
, such that a None
value terminates the stream. Recover
is compatible with any error type of the caller's choosing.
Trait Implementations
impl<A: Debug, E: Debug, F: Debug> Debug for Recover<A, E, F>
[src]
impl<A: Debug, E: Debug, F: Debug> Debug for Recover<A, E, F>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<A, E, F> Stream for Recover<A, E, F> where
A: Stream,
F: FnMut(A::Error) -> Option<A::Item>,
[src]
impl<A, E, F> Stream for Recover<A, E, F> where
A: Stream,
F: FnMut(A::Error) -> Option<A::Item>,
type Item = A::Item
Values yielded by the stream.
type Error = E
Errors yielded by the stream.
fn poll_next(&mut self, cx: &mut Context) -> Poll<Option<A::Item>, E>
[src]
fn poll_next(&mut self, cx: &mut Context) -> Poll<Option<A::Item>, E>
Attempt to pull out the next value of this stream, registering the current task for wakeup if the value is not yet available, and returning None
if the stream is exhausted. Read more