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§
Sourcefn get_varint(&mut self) -> GetVarint<'_, Self> ⓘ
fn get_varint(&mut self) -> GetVarint<'_, Self> ⓘ
Reads an unsigned variable-length integer in network byte-order from a source.
Sourcefn get_buffer<'a>(&'a mut self, buffer: &'a mut [u8]) -> GetBuffer<'a, Self> ⓘ
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.