[][src]Struct futures::stream::Forward

#[must_use = "futures do nothing unless polled"]
pub struct Forward<T: Stream, U> { /* 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
    U: Sink<SinkItem = T::Item>,
    T: Stream,
    T::Error: From<U::SinkError>, 
[src]

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: Debug + Stream, U: Debug> Debug for Forward<T, U> where
    T::Item: Debug
[src]

impl<T, U> Future for Forward<T, U> where
    U: Sink<SinkItem = T::Item>,
    T: Stream,
    T::Error: From<U::SinkError>, 
[src]

type Item = (T, U)

The type of value that this future will resolved with if it is successful. Read more

type Error = T::Error

The type of error that this future will resolve with if it fails in a normal fashion. Read more

Auto Trait Implementations

impl<T, U> RefUnwindSafe for Forward<T, U> where
    T: RefUnwindSafe,
    U: RefUnwindSafe,
    <T as Stream>::Item: RefUnwindSafe

impl<T, U> Send for Forward<T, U> where
    T: Send,
    U: Send,
    <T as Stream>::Item: Send

impl<T, U> Sync for Forward<T, U> where
    T: Sync,
    U: Sync,
    <T as Stream>::Item: Sync

impl<T, U> Unpin for Forward<T, U> where
    T: Unpin,
    U: Unpin,
    <T as Stream>::Item: Unpin

impl<T, U> UnwindSafe for Forward<T, U> where
    T: UnwindSafe,
    U: UnwindSafe,
    <T as Stream>::Item: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Future = F

The future that this type can be converted into.

type Item = <F as Future>::Item

The item that the future may resolve with.

type Error = <F as Future>::Error

The error that the future may resolve with.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.