[][src]Struct futures::sink::SinkFromErr

#[must_use = "futures do nothing unless polled"]
pub struct SinkFromErr<S, E> { /* fields omitted */ }

A sink combinator to change the error type of a sink.

This is created by the Sink::from_err method.

Methods

impl<S, E> SinkFromErr<S, E>[src]

pub fn get_ref(&self) -> &S[src]

Get a shared reference to the inner sink.

pub fn get_mut(&mut self) -> &mut S[src]

Get a mutable reference to the inner sink.

pub fn into_inner(self) -> S[src]

Consumes this combinator, returning the underlying sink.

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: Stream, E> Stream for SinkFromErr<S, E>[src]

type Item = S::Item

The type of item this stream will yield on success.

type Error = S::Error

The type of error this stream may generate.

impl<S, E> Sink for SinkFromErr<S, E> where
    S: Sink,
    E: From<S::SinkError>, 
[src]

type SinkItem = S::SinkItem

The type of value that the sink accepts.

type SinkError = E

The type of value produced by the sink when an error occurs.

impl<S: Debug, E: Debug> Debug for SinkFromErr<S, E>[src]

impl<S: Clone, E: Clone> Clone for SinkFromErr<S, E>[src]

Auto Trait Implementations

impl<S, E> Send for SinkFromErr<S, E> where
    E: Send,
    S: Send

impl<S, E> Sync for SinkFromErr<S, E> where
    E: Sync,
    S: Sync

impl<S, E> Unpin for SinkFromErr<S, E> where
    E: Unpin,
    S: Unpin

impl<S, E> RefUnwindSafe for SinkFromErr<S, E> where
    E: RefUnwindSafe,
    S: RefUnwindSafe

impl<S, E> UnwindSafe for SinkFromErr<S, E> where
    E: UnwindSafe,
    S: UnwindSafe

Blanket Implementations

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

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> Into<U> for T where
    U: From<T>, 
[src]

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.

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

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

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.