Trait mz_persist_types::columnar::Schema

source ·
pub trait Schema<T>: Debug + Send + Sync {
    type Encoder: PartEncoder<T> + Debug;
    type Decoder: PartDecoder<T> + Debug;

    // Required methods
    fn columns(&self) -> DynStructCfg;
    fn decoder(&self, cols: ColumnsRef) -> Result<Self::Decoder, String>;
    fn encoder(&self, cols: ColumnsMut) -> Result<Self::Encoder, String>;
}
Expand description

A description of the structure of a crate::Codec implementor.

Required Associated Types§

source

type Encoder: PartEncoder<T> + Debug

The associated PartEncoder implementor.

source

type Decoder: PartDecoder<T> + Debug

The associated PartDecoder implementor.

Required Methods§

source

fn columns(&self) -> DynStructCfg

Returns the name and types of the columns in this type.

source

fn decoder(&self, cols: ColumnsRef) -> Result<Self::Decoder, String>

Returns a Self::Decoder for the given columns.

source

fn encoder(&self, cols: ColumnsMut) -> Result<Self::Encoder, String>

Returns a Self::Encoder for the given columns.

Implementors§