pub fn from_bytes<'a, T>(buf: &'a [u8]) -> Result<T, ErrorWithContext<'a>>where
T: Deserialize<'a>,Expand description
Deserialize a bencode value. If there are trailing bytes, will error.
pub fn from_bytes<'a, T>(buf: &'a [u8]) -> Result<T, ErrorWithContext<'a>>where
T: Deserialize<'a>,Deserialize a bencode value. If there are trailing bytes, will error.