Skip to main content

from_slice

Function from_slice 

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

Deserializes exactly one YAML document from a byte slice.

ยงErrors

Returns an error when the bytes are not UTF-8, the YAML is invalid, or the document cannot be deserialized as T.