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).