Trait mz_durable_cache::DurableCacheCodec

source ·
pub trait DurableCacheCodec: Debug + Eq {
    type Key: Ord + Hash + Clone + Debug;
    type Val: Eq + Debug;
    type KeyCodec: Codec + Ord + Debug + Clone;
    type ValCodec: Codec + Ord + Debug + Clone;

    // Required methods
    fn schemas(    ) -> (<Self::KeyCodec as Codec>::Schema, <Self::ValCodec as Codec>::Schema);
    fn encode(
        key: &Self::Key,
        val: &Self::Val,
    ) -> (Self::KeyCodec, Self::ValCodec);
    fn decode(
        key: &Self::KeyCodec,
        val: &Self::ValCodec,
    ) -> (Self::Key, Self::Val);
}

Required Associated Types§

Required Methods§

source

fn schemas() -> (<Self::KeyCodec as Codec>::Schema, <Self::ValCodec as Codec>::Schema)

source

fn encode(key: &Self::Key, val: &Self::Val) -> (Self::KeyCodec, Self::ValCodec)

source

fn decode(key: &Self::KeyCodec, val: &Self::ValCodec) -> (Self::Key, Self::Val)

Object Safety§

This trait is not object safe.

Implementors§