[][src]Struct tokio_simplified::AsyncWriter

pub struct AsyncWriter<Codec> where
    Codec: Encoder
{ /* fields omitted */ }

A simple interface to interact with a tokio sink.

Should always be constructed by a call to some AsyncReadWriter's get_writer().

Methods

impl<Codec> AsyncWriter<Codec> where
    Codec: Encoder
[src]

pub fn write(
    &self,
    frame: <Codec as Encoder>::Item
) -> Result<AsyncSink<<Codec as Encoder>::Item>, SendError<<Codec as Encoder>::Item>>
[src]

Forwards the frame to the tokio sink associated with the AsyncReadWriter that build this instance.

Auto Trait Implementations

impl<Codec> Send for AsyncWriter<Codec> where
    <Codec as Encoder>::Item: Send

impl<Codec> !Sync for AsyncWriter<Codec>

Blanket Implementations

impl<T> From for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

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

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

impl<T, U> TryInto 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> Erased for T