[][src]Struct twitchchat::writer::MpscWriter

pub struct MpscWriter { /* fields omitted */ }
This is supported on crate feature async only.

A mpsc-based writer.

This can be used both a std::io::Write instance and an AsyncWrite instance.

Implementations

impl MpscWriter[src]

pub const fn new(channel: Sender<Box<[u8]>>) -> Self[src]

Create a new Writer with this Sender

pub fn encode<M>(&mut self, msg: M) -> Result<()> where
    M: Encodable + Send
[src]

Encode this message to the inner channel

Trait Implementations

impl AsyncWrite for MpscWriter[src]

impl Clone for MpscWriter[src]

impl Debug for MpscWriter[src]

impl Write for MpscWriter[src]

Auto Trait Implementations

Blanket Implementations

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

impl<W> AsyncWriteExt for W where
    W: AsyncWrite + ?Sized

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> FuturesAsyncWriteCompatExt for T where
    T: AsyncWrite
[src]

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

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

type Owned = T

The resulting type after obtaining ownership.

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.

impl<T> WriteExt for T where
    T: AsyncWrite + ?Sized