Encode

Trait Encode 

Source
pub trait Encode {
    // Required method
    fn encode_record<W: BufWriter>(&self, writer: &mut W);
}
Expand description

A datatype which can be encoded.

The transaction payload of the commitlog (i.e. individual records in the log) must satisfy this trait.

Required Methods§

Source

fn encode_record<W: BufWriter>(&self, writer: &mut W)

Encode self to the given buffer.

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.

Implementations on Foreign Types§

Source§

impl Encode for ()

Source§

fn encode_record<W: BufWriter>(&self, _writer: &mut W)

Source§

impl Encode for ProductValue

Source§

fn encode_record<W: BufWriter>(&self, writer: &mut W)

Source§

impl<T: Encode> Encode for Arc<T>

Source§

fn encode_record<W: BufWriter>(&self, writer: &mut W)

Source§

impl<const N: usize> Encode for [u8; N]

Source§

fn encode_record<W: BufWriter>(&self, writer: &mut W)

Implementors§

Source§

impl<T: Encode> Encode for Txdata<T>