pub fn deserialize<'de, T, D>(deserializer: D) -> Result<Option<T>, D::Error>where
T: Deserialize<'de>,
D: Deserializer<'de>,
Expand description
Deserializes a value using the singleton_map
representation.
This function expects the input to be in the singleton_map
representation.
If the input is a YAML map with a single key-value pair, the value will be deserialized
and wrapped in Some
. If the input is null
, it will be deserialized as None
.
§Arguments
deserializer
- The deserializer to use for deserializing the value.
§Returns
A result containing the deserialized optional value or an error if deserialization fails.