[][src]Trait kv::Encoding

pub trait Encoding: Sized {
    fn encode_to<W: Write>(&self, w: &mut W) -> Result<(), Error>;
fn decode_from<R: Read>(r: &mut R) -> Result<Self, Error>; fn encode(&self) -> Result<ValueBuf<Self>, Error> { ... }
fn decode<'a, V: Value<'a>>(val: &'a V) -> Result<Self, Error> { ... } }

Encoded values

Required methods

fn encode_to<W: Write>(&self, w: &mut W) -> Result<(), Error>

Encode an object to io::Write

fn decode_from<R: Read>(r: &mut R) -> Result<Self, Error>

Decode from a reader

Loading content...

Provided methods

fn encode(&self) -> Result<ValueBuf<Self>, Error>

Encode an object to ValueBuf

fn decode<'a, V: Value<'a>>(val: &'a V) -> Result<Self, Error>

Decode from an existing value

Loading content...

Implementors

impl<T> Encoding for Bincode<T> where
    T: DeserializeOwned + Serialize
[src]

impl<T> Encoding for Cbor<T> where
    T: DeserializeOwned + Serialize
[src]

impl<T> Encoding for Json<T> where
    T: DeserializeOwned + Serialize
[src]

impl<T> Encoding for Msgpack<T> where
    T: DeserializeOwned + Serialize
[src]

Loading content...