Skip to main content

from_str

Function from_str 

Source
pub fn from_str<'de, D: Deserializer<'de>, T: FromStr>(
    deserializer: D,
) -> Result<T, D::Error>
where <T as FromStr>::Err: Debug,
Expand description

Deserializes a type using its FromStr implementation.

ยงErrors

  1. If a string cannot be parsed from the deserializer.
  2. If the type cannot be parsed from the string.