Trait KeyDecode

Source
pub trait KeyDecode<'a> {
    // Required method
    fn decode(bytes: &'a [u8]) -> Result<Self, Error>
       where Self: Sized;
}
Expand description

A trait for types which can be decoded from a kv-store key bytes.

Required Methods§

Source

fn decode(bytes: &'a [u8]) -> Result<Self, Error>
where Self: Sized,

Implementations on Foreign Types§

Source§

impl KeyDecode<'_> for Vec<u8>

Source§

fn decode(bytes: &[u8]) -> Result<Self, Error>
where Self: Sized,

Source§

impl<'a> KeyDecode<'a> for ()

Source§

fn decode(_: &'a [u8]) -> Result<Self, Error>
where Self: Sized,

Implementors§