toml::de

Function from_slice

Source
pub fn from_slice<'de, T>(bytes: &'de [u8]) -> Result<T, Error>
where T: Deserialize<'de>,
Expand description

Deserializes a byte slice into a type.

This function will attempt to interpret bytes as UTF-8 data and then deserialize T from the TOML document provided.