Trait ant_king_image::sled_json::Encoder[][src]

pub trait Encoder<'a> {
    type In;
    type Encoded: AsRef<[u8]>;
    type Out;
    fn encode(d: Self::In) -> Self::Encoded;
fn decode(bytes: &'a [u8]) -> Option<Self::Out>; }

Associated Types

Loading content...

Required methods

fn encode(d: Self::In) -> Self::Encoded[src]

fn decode(bytes: &'a [u8]) -> Option<Self::Out>[src]

Loading content...

Implementors

impl<'a> Encoder<'a> for DefaultEncoder[src]

type In = &'a [u8]

type Encoded = &'a [u8]

type Out = &'a [u8]

impl<'a, T> Encoder<'a> for JSONEncoder<T> where
    T: Sized + Serialize + Deserialize<'a>,
    T: 'a, 
[src]

type In = &'a T

type Encoded = Vec<u8>

type Out = T

Loading content...