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§
- Serialize
Bytes AsHex - Byte slice wrapper to serialize as a hex string in lowercase characters.
- Serialize
Bytes AsHex Lower - Byte slice wrapper to serialize as a hex string in lowercase characters.
- Serialize
Bytes AsHex Upper - Byte slice wrapper to serialize as a hex string in uppercase characters.
Functions§
- deserialize
- Deserializes a hex string into raw bytes.
- serialize
- Serializes
data
as a hex string using lowercase characters. - serialize_
lower - Serializes
data
as a hex string using lowercase characters. - serialize_
upper - Serializes
data
as hex string using uppercase characters.