Function icinga2_api::serde::deserialize_empty_string_or_parse
source · [−]pub fn deserialize_empty_string_or_parse<'de, T, D>(
deserializer: D
) -> Result<Option<T>, D::Error> where
D: Deserializer<'de>,
T: FromStr,
T::Err: Display,
Expand description
deserialize an optional value with a FromStr implementation where None is represented as an empty string
Errors
returns an error if the value can not be interpreted as null or a String