Swapbytes
Rust library for swapping the endianess of a structure using a derive macro
Cargo
Using swapbytes
with cargo
[]
= "0.2"
or
cargo add swapbytes
use SwapBytes;
let mut value: Test = Test ;
value.swap_bytes_mut;
/* Enum must implement Clone, Copy */
/* Only number repr types are supported */