1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
//! Base64 encoding support for human-readable serialization.
//!
//! This module provides an alternative to the default hex encoding.
//! Use it with `#[serde(with = "serde_human_bytes::base64")]`.
//!
//! # Example
//!
//! ```
//! use serde_derive::{Deserialize, Serialize};
//!
//! #[derive(Deserialize, Serialize)]
//! struct Example {
//! #[serde(with = "serde_human_bytes::base64")]
//! data: Vec<u8>,
//!
//! #[serde(with = "serde_human_bytes::base64")]
//! byte_buf: serde_human_bytes::ByteBuf,
//!
//! #[serde(with = "serde_human_bytes::base64")]
//! boxed: Box<[u8]>,
//! }
//! ```
use ;
/// Serde `serialize_with` function emitting standard base64.
/// Serde `deserialize_with` function accepting standard base64.