pub fn from_bytes_with_rest<'a, T>(
buf: &'a [u8],
) -> Result<(T, &'a [u8]), ErrorWithContext<'a>>where
T: Deserialize<'a>,Expand description
Deserialize a bencode value at the start of the buffer, return it and the remaining bytes.
pub fn from_bytes_with_rest<'a, T>(
buf: &'a [u8],
) -> Result<(T, &'a [u8]), ErrorWithContext<'a>>where
T: Deserialize<'a>,Deserialize a bencode value at the start of the buffer, return it and the remaining bytes.