mz_durable_cache

Trait 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)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§