Trait schemadb::schema::ValueCodec[][src]

pub trait ValueCodec<S: Schema + ?Sized>: Sized + PartialEq + Debug {
    fn encode_value(&self) -> Result<Vec<u8>>;
fn decode_value(data: &[u8]) -> Result<Self>; }
Expand description

This trait defines a type that can serve as a Schema::Value.

Required methods

Converts self to bytes to be stored in DB.

Converts bytes fetched from DB to Self.

Implementors