BytesReaderAsync

Trait BytesReaderAsync 

Source
pub trait BytesReaderAsync {
    // Required methods
    fn get_varint(&mut self) -> GetVarint<'_, Self> ;
    fn get_buffer<'a>(&'a mut self, buffer: &'a mut [u8]) -> GetBuffer<'a, Self> ;
}
Expand description

Reads bytes or varints asynchronously.

Required Methods§

Source

fn get_varint(&mut self) -> GetVarint<'_, Self>

Reads an unsigned variable-length integer in network byte-order from a source.

Source

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

Reads the source until buffer is completely filled.

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> BytesReaderAsync for T
where T: AsyncRead + ?Sized,