pub trait StateCodec {
    type KeyCodec;
    type ValueCodec;

    // Required methods
    fn key_codec(&self) -> &Self::KeyCodec;
    fn value_codec(&self) -> &Self::ValueCodec;
}
Expand description

A trait for types that can serialize keys and values, as well as deserializing values for storage access.

Required Associated Types§

source

type KeyCodec

The codec used to serialize keys

source

type ValueCodec

The codec used to serialize and deserialize values

Required Methods§

source

fn key_codec(&self) -> &Self::KeyCodec

Returns a reference to the type’s key codec

source

fn value_codec(&self) -> &Self::ValueCodec

Returns a reference to the type’s value codec

Implementors§