Crate hex_serde [] [src]

Integration between hex and serde

Examples

#[derive(Serialize, Deserialize)]
struct Sha256(#[serde(with = "hex_serde")] [u8; 32]);

#[derive(Serialize, Deserialize)]
struct MyStruct {
    #[serde(with = "hex_serde")] icecream: Vec<u8>,
    count: u64,
}

Functions

deserialize

A deserializer that first encodes the argument as a hex-string

serialize

A serializer that first encodes the argument as a hex-string