Trait kv::Encoding
[−]
[src]
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 decode<'a, V: Value<'a>>(val: &'a V) -> Result<Self, Error>; fn encode(&self) -> Result<ValueBuf<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
fn decode<'a, V: Value<'a>>(val: &'a V) -> Result<Self, Error>
Decode from an existing value