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> { ... }
}
Expand description
Encoded values