Trait pancake_db_core::primitives::Primitive
source · [−]pub trait Primitive: 'static + Default + Send + Sync {
type A: Atom;
const DTYPE: DataType;
const IS_ATOMIC: bool;
fn to_value(&self) -> Value;
fn try_from_value(v: &Value) -> CoreResult<Self>
where
Self: Sized;
fn to_atoms(&self) -> Vec<Self::A>;
fn try_from_atoms(atoms: &[Self::A]) -> CoreResult<Self>
where
Self: Sized;
fn new_codec(codec: &str) -> Option<Box<dyn Codec<P = Self>>>;
fn new_value_codec(codec: &str) -> Option<Box<dyn ValueCodec>>
where
Self: Sized,
{ ... }
}