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§
sourcetype Encoder: PartEncoder<T> + Debug
type Encoder: PartEncoder<T> + Debug
The associated PartEncoder implementor.
sourcetype Decoder: PartDecoder<T> + Debug
type Decoder: PartDecoder<T> + Debug
The associated PartDecoder implementor.
Required Methods§
sourcefn columns(&self) -> DynStructCfg
fn columns(&self) -> DynStructCfg
Returns the name and types of the columns in this type.
sourcefn decoder(&self, cols: ColumnsRef) -> Result<Self::Decoder, String>
fn decoder(&self, cols: ColumnsRef) -> Result<Self::Decoder, String>
Returns a Self::Decoder
for the given columns.
sourcefn encoder(&self, cols: ColumnsMut) -> Result<Self::Encoder, String>
fn encoder(&self, cols: ColumnsMut) -> Result<Self::Encoder, String>
Returns a Self::Encoder for the given columns.