Skip to main content

KeyValueCodec

Trait KeyValueCodec 

Source
pub trait KeyValueCodec {
    // Required methods
    fn to_key_value(&self) -> Value;
    fn from_key_value(value: &Value) -> Option<Self>
       where Self: Sized;
}
Expand description

KeyValueCodec

Narrow runtime Value codec for typed primary keys and key-only access surfaces. This exists to keep cursor, access, and key-routing contracts off the wider structured-value conversion surface used by persisted-field codecs and planner queryability metadata.

Required Methods§

Source

fn to_key_value(&self) -> Value

Source

fn from_key_value(value: &Value) -> Option<Self>
where Self: Sized,

Implementors§