pub trait BytesReader<'a> {
// Required methods
fn get_varint(&mut self) -> Option<VarInt>;
fn get_bytes(&mut self, len: usize) -> Option<&'a [u8]>;
}Expand description
Reads bytes or varint from a source.
Required Methods§
Sourcefn get_varint(&mut self) -> Option<VarInt>
fn get_varint(&mut self) -> Option<VarInt>
Reads an unsigned variable-length integer in network byte-order from the current offset and advances the offset.
Returns None if not enough capacity (offset is not advanced in that case).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".