pub fn serialize<T, S>(value: &T, serializer: S) -> Result<S::Ok, S::Error>where
T: Serialize,
S: Serializer,
Expand description
Serializes a value using the singleton_map
representation.
This function is a wrapper around singleton_map::serialize
and allows using
singleton_map
in combination with other serialize_with
attributes.
§Arguments
value
- A reference to the value to be serialized.serializer
- The serializer to use for serializing the value.
§Returns
A result containing the serialization output or an error if serialization fails.