serde-human-bytes
A fork of serde_bytes that serialize bytes to hex string when the format is human readable.
[]
= "0.1"
Example
use ;
A fork of serde_bytes that serialize bytes to hex string when the format is human readable.
[dependencies]
serde-human-bytes = "0.1"
use serde::{Deserialize, Serialize};
#[derive(Deserialize, Serialize)]
struct Efficient<'a> {
#[serde(with = "serde_human_bytes")]
bytes: &'a [u8],
#[serde(with = "serde_human_bytes")]
byte_buf: Vec<u8>,
}