Trait spacetimedb_commitlog::payload::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.

Object Safety§

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>