pub fn try_from_str<'de, D: Deserializer<'de>, T: FromStr>( deserializer: D, ) -> Result<Option<T>, D::Error>
Try to deserialize a type using its FromStr implementation, fallback to None if it doesn’t work.
FromStr
None
If a string cannot be parsed from the deserializer.