Skip to main content

from_str

Function from_str 

Source
pub fn from_str<'de, T>(input: &'de str) -> Result<T, Error>
where T: Deserialize<'de>,
Expand description

Deserializes exactly one YAML document from a string.

ยงErrors

Returns an error when the YAML is invalid, does not contain exactly one document, or cannot be deserialized as T.