Struct futures::stream::Forward
[−]
[src]
#[must_use = "futures do nothing unless polled"]pub struct Forward<T, U> where
T: Stream, { /* fields omitted */ }
Future for the Stream::forward
combinator, which sends a stream of values
to a sink and then waits until the sink has fully flushed those values.
Methods
impl<T, U> Forward<T, U> where
T: Stream,
U: Sink<SinkItem = <T as Stream>::Item>,
<T as Stream>::Error: From<<U as Sink>::SinkError>,
[src]
T: Stream,
U: Sink<SinkItem = <T as Stream>::Item>,
<T as Stream>::Error: From<<U as Sink>::SinkError>,
pub fn sink_ref(&self) -> Option<&U>
[src]
Get a shared reference to the inner sink. If this combinator has already been polled to completion, None will be returned.
pub fn sink_mut(&mut self) -> Option<&mut U>
[src]
Get a mutable reference to the inner sink. If this combinator has already been polled to completion, None will be returned.
pub fn stream_ref(&self) -> Option<&T>
[src]
Get a shared reference to the inner stream. If this combinator has already been polled to completion, None will be returned.
pub fn stream_mut(&mut self) -> Option<&mut T>
[src]
Get a mutable reference to the inner stream. If this combinator has already been polled to completion, None will be returned.
Trait Implementations
impl<T, U> Future for Forward<T, U> where
T: Stream,
U: Sink<SinkItem = <T as Stream>::Item>,
<T as Stream>::Error: From<<U as Sink>::SinkError>,
[src]
T: Stream,
U: Sink<SinkItem = <T as Stream>::Item>,
<T as Stream>::Error: From<<U as Sink>::SinkError>,
type Item = (T, U)
A successful value
type Error = <T as Stream>::Error
An error
fn poll(
&mut self,
cx: &mut Context
) -> Result<Async<(T, U)>, <T as Stream>::Error>
[src]
&mut self,
cx: &mut Context
) -> Result<Async<(T, U)>, <T as Stream>::Error>
Attempt to resolve the future to a final value, registering the current task for wakeup if the value is not yet available. Read more
impl<T, U> Debug for Forward<T, U> where
T: Debug + Stream,
U: Debug,
<T as Stream>::Item: Debug,
[src]
T: Debug + Stream,
U: Debug,
<T as Stream>::Item: Debug,