pub fn from_slice<'de, T>(s: &'de [u8]) -> Result<T, Error>where
T: Deserialize<'de>,
Available on crate features
parse
and serde
only.Expand description
Deserializes bytes into a type.
This function will attempt to interpret s
as a TOML document and
deserialize T
from the document.
To deserializes TOML values, instead of documents, see ValueDeserializer
.