Function serde_tagged::ser::external::serialize [] [src]

pub fn serialize<S, T: ?Sized, V: ?Sized>(
    serializer: S,
    tag: &T,
    value: &V
) -> Result<S::Ok, S::Error> where
    S: Serializer,
    T: Serialize,
    V: Serialize

Applies a tag externally to the specified value and serializes them using the provided serializer.

The tag-value pair will be serialized as a map with one entry, where the tag will be the key. 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.