pub fn serialize<S: Serializer>(
data: &[u8],
serializer: S,
) -> Result<S::Ok, S::Error>Available on crate feature
serde and (crate features alloc) only.Expand description
Serializes data to a hex string (human-readable) or raw bytes
(binary formats).
Typically used via #[serde(with = "hex")]. See the module-level
documentation for a full example.