BytesWriterAsync

Trait BytesWriterAsync 

Source
pub trait BytesWriterAsync {
    // Required methods
    fn put_varint(&mut self, varint: VarInt) -> PutVarint<'_, Self> ;
    fn put_buffer<'a>(&'a mut self, buffer: &'a [u8]) -> PutBuffer<'a, Self> ;
}
Expand description

Writes bytes or varints asynchronously.

Required Methods§

Source

fn put_varint(&mut self, varint: VarInt) -> PutVarint<'_, Self>

Writes an unsigned variable-length integer in network byte-order to the source advancing the buffer’s internal cursor.

Source

fn put_buffer<'a>(&'a mut self, buffer: &'a [u8]) -> PutBuffer<'a, Self>

Pushes some bytes into the source advancing the buffer’s internal cursor.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T> BytesWriterAsync for T
where T: AsyncWrite + ?Sized,