empty_string_as_none

Function empty_string_as_none 

Source
pub fn empty_string_as_none<'de, D>(
    deserializer: D,
) -> Result<Option<String>, D::Error>
where D: Deserializer<'de>,
Expand description

Deserializes an optional string field, returning None if a string is found but is empty.