Function serde_tagged::ser::external::serialize
source · pub fn serialize<S, T, V>(
serializer: S,
tag: &T,
value: &V,
) -> Result<S::Ok, S::Error>
Expand description
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
.