Available on crate feature
serde
only.Expand description
Hex encoding with serde
.
The functions in this module de/serialize as hex only when the serializer is human readable.
§Examples
use hex_conservative as hex;
use serde::{Serialize, Deserialize};
#[derive(Debug, Serialize, Deserialize)]
struct Foo {
#[serde(with = "hex::serde")]
bar: Vec<u8>,
}
Structs§
- Byte slice wrapper to serialize as a hex string in lowercase characters.
- Byte slice wrapper to serialize as a hex string in lowercase characters.
- Byte slice wrapper to serialize as a hex string in uppercase characters.
Functions§
- Deserializes a hex string into raw bytes.
- Serializes
data
as a hex string using lowercase characters. - Serializes
data
as a hex string using lowercase characters. - Serializes
data
as hex string using uppercase characters.