Function bt_bencode::from_slice
source · [−]pub fn from_slice<'a, T>(s: &'a [u8]) -> Result<T> where
T: Deserialize<'a>, Expand description
Deserializes an instance of T from a slice of bytes.
Errors
Deserialization can fail if the data is not valid, if the data cannot cannot be deserialized
into an instance of T, and other IO errors.