Trait ordered_varint::Variable[][src]

pub trait Variable: Sized {
    fn encode_variable<W: Write>(&self, destination: &mut W) -> Result<usize>;
fn decode_variable<R: Read>(source: R) -> Result<Self>; fn to_variable_vec(&self) -> Result<Vec<u8>> { ... } }
Expand description

Encodes and decodes a type using a variable-length format.

Required methods

Encodes self into destination, returning the number of bytes written upon success.

Decodes a variable length value from source.

Provided methods

Encodes self into a new Vec<u8>.

Implementations on Foreign Types

Implementors