Module vector_core::serde::ascii_char
source · Expand description
Handling of ASCII characters in u8
fields via serde
s with
attribute.
use vector_core::serde::ascii_char;
#[derive(Deserialize, Serialize)]
struct Foo {
#[serde(with = "ascii_char")]
character: u8,
}
Functions§
- Deserialize an ASCII character as
u8
. - Serialize an
u8
as ASCII character.