Trait Builder

Source
pub trait Builder {
    // Required methods
    fn length(&self) -> usize;
    fn into_mut_vec(&self, data: &mut Vec<u8>, pos: usize);

    // Provided method
    fn into_vec(&self) -> Vec<u8>  { ... }
}
Expand description

An abstraction over a suspended computation involving a sequence of bytes.

Required Methods§

Source

fn length(&self) -> usize

The length of the bytes value.

Source

fn into_mut_vec(&self, data: &mut Vec<u8>, pos: usize)

Serializes the value of the computation into a mutable byte vector.

Provided Methods§

Source

fn into_vec(&self) -> Vec<u8>

Serializes the value of the computation into a byte vector.

Implementors§