pub trait NestedEncodeOutput {
    // Required method
    fn write(&mut self, bytes: &[u8]);

    // Provided method
    fn push_byte(&mut self, byte: u8) { ... }
}
Expand description

Trait that allows appending bytes. Used especially by the NestedEncode trait to output data.

In principle it can be anything, but in practice we only keep 1 implementation, which is Vec. This is to avoid code duplication by monomorphization.

Required Methods§

source

fn write(&mut self, bytes: &[u8])

Write to the output.

Provided Methods§

source

fn push_byte(&mut self, byte: u8)

Write a single byte to the output.

Implementors§