EncodeAppend

Trait EncodeAppend 

Source
pub trait EncodeAppend {
    type Item: Encode;

    // Required method
    fn append(
        self_encoded: Vec<u8>,
        to_append: &[Self::Item],
    ) -> Option<Vec<u8>>;
}
Expand description

Trait that allows to append items to an encoded representation without decoding all previous added items.

Required Associated Types§

Source

type Item: Encode

The item that will be appended.

Required Methods§

Source

fn append(self_encoded: Vec<u8>, to_append: &[Self::Item]) -> Option<Vec<u8>>

Append to_append items to the given self_encoded representation.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§