structio 0.8.0

High performance JSON and BEVE for Rust structs. No dependencies, no proc-macros, no intermediate representation.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// A variant carries at most one value, and this one has two. `(_)` does not
// say how many fields there are, so the arity is caught by the patterns the
// macro builds for the variant rather than by the declaration's grammar.
#[derive(Default)]
enum Span {
    #[default]
    None,
    Range(u32, u32),
}

structio::tagged_enum!(Span { None, Range(_) });

fn main() {}