[][src]Trait twitchchat::WriteAdapter

pub trait WriteAdapter {
    type Writer;
    type Error;
    fn write_line(&mut self, line: &[u8]) -> Result<(), Self::Error>;
fn into_inner(self) -> Self::Writer; }

WriteAdapter allows you to provide your own "writer" for the client

Associated Types

type Writer

The inner write type

type Error

The error writing to this type can cause

Loading content...

Required methods

fn write_line(&mut self, line: &[u8]) -> Result<(), Self::Error>

Tries to write a byte array (a utf-8 encoded string ending with \r\n) to the writer

fn into_inner(self) -> Self::Writer

Consume the adapter and returns the inner writer

Loading content...

Implementors

impl<W: Write> WriteAdapter for SyncWriteAdapter<W>[src]

type Writer = W

type Error = Error

Loading content...