pub trait BytesWriter {
// Required methods
fn put_varint(&mut self, varint: VarInt) -> Result<(), EndOfBuffer>;
fn put_bytes(&mut self, bytes: &[u8]) -> Result<(), EndOfBuffer>;
}Expand description
Writes bytes or varint on a source.
Required Methods§
Sourcefn put_varint(&mut self, varint: VarInt) -> Result<(), EndOfBuffer>
fn put_varint(&mut self, varint: VarInt) -> Result<(), EndOfBuffer>
Writes an unsigned variable-length integer in network byte-order at the current offset and advances the offset.
Returns Err if source is exhausted and no space is available.