fn empty_string_as_none<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
where
    D: Deserializer<'de>,
{
    let s = String::deserialize(deserializer)?;
    if s.is_empty() {
        Ok(None)
    } else {
        Ok(Some(s))
    }
}
/// Function to deserialize field to `Option<String>`, where empty strings are
/// deserialized into `None`.
Function to deserialize field to `Option`, where empty strings are
deserialized into `None`.
Function to deserialize field to ` Option ` where empty strings are deserialized into ` None ` .
fn empty_string_as_none<'de, D>(deserializer: D) -> Result<Option<String>, D::Error>
where
    D: Deserializer<'de>,
{
    let s = String::deserialize(deserializer)?;
    if s.is_empty() {
        Ok(None)
    } else {
        Ok(Some(s))
    }
}
fn empty_string_as_none < ' de , D > ( deserializer : D ) -> Result < Option < String > , D :: Error > where D : Deserializer < ' de > , { let s = String :: deserialize ( deserializer ) ? ; if s . is_empty ( ) { Ok ( None ) } else { Ok ( Some ( s ) ) } }
Function to deserialize field to `Option<String>`, where empty strings are
deserialized into `None`.
Function to deserialize field to ` Option<String > ` where empty strings are deserialized into ` None ` .
deserializer
D