Trait KeyFormatAtom

Source
pub trait KeyFormatAtom {
    // Required methods
    fn size() -> usize;
    fn encode_atom(self) -> Vec<u8> ;
    fn decode_atom(data: &[u8]) -> Self
       where Self: Sized;
}
Expand description

Part of the KeyFormat to be used with key-value backends for constructing keys.

Required Methods§

Source

fn size() -> usize

Source

fn encode_atom(self) -> Vec<u8>

Source

fn decode_atom(data: &[u8]) -> Self
where Self: Sized,

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.

Implementations on Foreign Types§

Source§

impl KeyFormatAtom for u8

Source§

fn size() -> usize

Source§

fn encode_atom(self) -> Vec<u8>

Source§

fn decode_atom(data: &[u8]) -> Self
where Self: Sized,

Source§

impl KeyFormatAtom for u64

Source§

fn size() -> usize

Source§

fn encode_atom(self) -> Vec<u8>

Source§

fn decode_atom(data: &[u8]) -> Self
where Self: Sized,

Source§

impl KeyFormatAtom for ()

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom, TupleElement3: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2, TupleElement3)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom, TupleElement3: KeyFormatAtom, TupleElement4: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom, TupleElement3: KeyFormatAtom, TupleElement4: KeyFormatAtom, TupleElement5: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom, TupleElement3: KeyFormatAtom, TupleElement4: KeyFormatAtom, TupleElement5: KeyFormatAtom, TupleElement6: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom, TupleElement3: KeyFormatAtom, TupleElement4: KeyFormatAtom, TupleElement5: KeyFormatAtom, TupleElement6: KeyFormatAtom, TupleElement7: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom, TupleElement3: KeyFormatAtom, TupleElement4: KeyFormatAtom, TupleElement5: KeyFormatAtom, TupleElement6: KeyFormatAtom, TupleElement7: KeyFormatAtom, TupleElement8: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8)

Source§

impl<TupleElement0: KeyFormatAtom, TupleElement1: KeyFormatAtom, TupleElement2: KeyFormatAtom, TupleElement3: KeyFormatAtom, TupleElement4: KeyFormatAtom, TupleElement5: KeyFormatAtom, TupleElement6: KeyFormatAtom, TupleElement7: KeyFormatAtom, TupleElement8: KeyFormatAtom, TupleElement9: KeyFormatAtom> KeyFormatAtom for (TupleElement0, TupleElement1, TupleElement2, TupleElement3, TupleElement4, TupleElement5, TupleElement6, TupleElement7, TupleElement8, TupleElement9)

Implementors§