Skip to main content

from_bytes

Function from_bytes 

Source
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.