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,

Object Safety§

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§