bebytes 3.0.2

A Rust library for serialization and deserialization of network structs.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use bebytes::BeBytes;

// This should fail because 3 is not a power of 2
#[derive(BeBytes, Debug, PartialEq, Copy, Clone)]
#[bebytes(flags)]
enum InvalidFlags {
    Flag1 = 1,
    Flag2 = 2,
    Flag3 = 3, // Not a power of 2!
    Flag4 = 4,
}

fn main() {}