Struct futures::stream::InspectErr [−][src]
#[must_use = "streams do nothing unless polled"]pub struct InspectErr<S, F> where
S: Stream, { /* fields omitted */ }
Do something with the error of a stream, passing it on.
This is created by the Stream::inspect_err
method.
Methods
impl<S, F> InspectErr<S, F> where
S: Stream,
[src]
impl<S, F> InspectErr<S, F> where
S: Stream,
ⓘImportant traits for &'a mut Ipub fn get_ref(&self) -> &S
[src]
pub fn get_ref(&self) -> &S
Acquires a reference to the underlying stream that this combinator is pulling from.
ⓘImportant traits for &'a mut Ipub fn get_mut(&mut self) -> &mut S
[src]
pub fn get_mut(&mut self) -> &mut S
Acquires a mutable reference to the underlying stream that this combinator is pulling from.
Note that care must be taken to avoid tampering with the state of the stream which may otherwise confuse this combinator.
pub fn into_inner(self) -> S
[src]
pub fn into_inner(self) -> S
Consumes this combinator, returning the underlying stream.
Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.
Trait Implementations
impl<S, F> Debug for InspectErr<S, F> where
F: Debug,
S: Debug + Stream,
[src]
impl<S, F> Debug for InspectErr<S, F> where
F: Debug,
S: Debug + Stream,
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
[src]
fn fmt(&self, f: &mut Formatter) -> Result<(), Error>
Formats the value using the given formatter. Read more
impl<S, F> Sink for InspectErr<S, F> where
S: Sink + Stream,
[src]
impl<S, F> Sink for InspectErr<S, F> where
S: Sink + Stream,
type SinkItem = <S as Sink>::SinkItem
The type of value that the sink accepts.
type SinkError = <S as Sink>::SinkError
The type of value produced by the sink when an error occurs.
fn poll_ready(
&mut self,
cx: &mut Context
) -> Result<Async<()>, <InspectErr<S, F> as Sink>::SinkError>
[src]
fn poll_ready(
&mut self,
cx: &mut Context
) -> Result<Async<()>, <InspectErr<S, F> as Sink>::SinkError>
Attempts to prepare the Sink
to receive a value. Read more
fn start_send(
&mut self,
item: <InspectErr<S, F> as Sink>::SinkItem
) -> Result<(), <InspectErr<S, F> as Sink>::SinkError>
[src]
fn start_send(
&mut self,
item: <InspectErr<S, F> as Sink>::SinkItem
) -> Result<(), <InspectErr<S, F> as Sink>::SinkError>
Begin the process of sending a value to the sink. Each call to this function must be preceded by a successful call to poll_ready
which returned Ok(Async::Ready(()))
. Read more
fn poll_flush(
&mut self,
cx: &mut Context
) -> Result<Async<()>, <InspectErr<S, F> as Sink>::SinkError>
[src]
fn poll_flush(
&mut self,
cx: &mut Context
) -> Result<Async<()>, <InspectErr<S, F> as Sink>::SinkError>
Flush any remaining output from this sink. Read more
fn poll_close(
&mut self,
cx: &mut Context
) -> Result<Async<()>, <InspectErr<S, F> as Sink>::SinkError>
[src]
fn poll_close(
&mut self,
cx: &mut Context
) -> Result<Async<()>, <InspectErr<S, F> as Sink>::SinkError>
Flush any remaining output and close this sink, if necessary. Read more
impl<S, F> Stream for InspectErr<S, F> where
F: FnMut(&<S as Stream>::Error),
S: Stream,
[src]
impl<S, F> Stream for InspectErr<S, F> where
F: FnMut(&<S as Stream>::Error),
S: Stream,
type Item = <S as Stream>::Item
Values yielded by the stream.
type Error = <S as Stream>::Error
Errors yielded by the stream.
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
[src]
fn poll_next(
&mut self,
cx: &mut Context
) -> Result<Async<Option<<S as Stream>::Item>>, <S as Stream>::Error>
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
Auto Trait Implementations
impl<S, F> Send for InspectErr<S, F> where
F: Send,
S: Send,
impl<S, F> Send for InspectErr<S, F> where
F: Send,
S: Send,
impl<S, F> Sync for InspectErr<S, F> where
F: Sync,
S: Sync,
impl<S, F> Sync for InspectErr<S, F> where
F: Sync,
S: Sync,