pub fn from_slice<'de, T>(buf: &'de [u8]) -> Result<T>where T: Deserialize<'de>,
Deserialize an instance of type T from a byte slice.
T
See the documentation of from_str for more information.
from_str
This functions fails with an error if buf does not contain valid UTF-8 or if the data does not match the structure of T.
buf