Function serde_tagged::ser::adj::map::serialize

source ·
pub fn serialize<S, Tk, Tv, Vk, V>(
    serializer: S,
    tag_key: &Tk,
    tag_value: &Tv,
    value_key: &Vk,
    value: &V,
) -> Result<S::Ok, S::Error>
where S: Serializer, Tk: Serialize + ?Sized, Tv: Serialize + ?Sized, Vk: Serialize + ?Sized, V: Serialize + ?Sized,
Expand description

Serializes the specified tag-key, tag, value-key and value as map.

The specified parameters will be serialized as map with two entries, where one entry contains a mapping from the tag-key to the tag and the second entry contains a mapping from the value-key to the value. The specified serializer performs the actual serialization and thus controls the data format. For more information on this tag-format, see the module documentation.

§Note

You should prefer this method to the Serializer.