[−][src]Trait packing::PackedBytes
Trait that enables endian aware conversion to/from bytes for packable types
Mostly for primitives. Currently expected to accept/return arrays by proc macro. Benchmarking showed allocating a new 1 to 8 byte array during to/from bytes performed exactly the same as manual bit shifting or various other shenanigans.
TODO: Above perf statement likely only holds true up to a certain size. Currently nested structs and packing/unpacking them to/from &mut u8 is not supported.