usebytes::{BufMut, Bytes};usefailure::Fail;/// Synchronously encode into a buffer.
pubtraitEncode{/// Encode into a `BufMut` buffer.
////// # Panics
////// Panics if self does not have enough capacity to encode into.
fnencode<B: BufMut +?Sized>(&self, buf:&mut B);}/// Synchronously decode from a buffer.
pubtraitDecode: Sized {/// Decode error type.
typeError: Fail;/// Decode from a `Bytes` buffer.
////// Returns the decoded type on success or a decode error on failure.
fndecode(buf:&mut Bytes)->Result<Self, Self::Error>;}