Trait mz_persist_types::columnar::ColumnDecoder

source ·
pub trait ColumnDecoder<T> {
    // Required methods
    fn decode(&self, idx: usize, val: &mut T);
    fn is_null(&self, idx: usize) -> bool;
}
Expand description

A decoder for values of a fixed schema.

This allows us to amortize the cost of downcasting columns into concrete types.

Required Methods§

source

fn decode(&self, idx: usize, val: &mut T)

Decode the value at idx into the buffer val.

Behavior for when the value at idx is null is implementation-defined. Panics if decoding an idx that is out-of-bounds.

source

fn is_null(&self, idx: usize) -> bool

Returns if the value at idx is null.

Implementors§