Function from_slice

fn from_slice<'de, T>(s: &'de [u8]) -> Result<T, Error>
where
    T: serde::de::Deserialize<'de>

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.