serde_repr 0.1.20

Derive Serialize and Deserialize that delegates to the underlying repr of a C-like enum.
Documentation
1
2
3
4
5
6
7
8
9
10
11
use serde_repr::Serialize_repr;

#[derive(Serialize_repr)]
struct SmallPrime {
    two: u8,
    three: u8,
    five: u8,
    seven: u8,
}

fn main() {}