pub fn parse<D: Deserialize, B: Buf>(buf: &mut B) -> Result<D, Error>
Convenient function to deserialize a structure from Bytes.