Trait gvariant::aligned_bytes::Alignment
source · [−]Expand description
A trait for our alignment structs A1
, A2
, A4
and A8
.
Ideally we’d just use const-generics here, but they’re not available on the
rust stable channel yet. This is the type-level equivalent of
enum Alignment {A1 = 1, A2 = 2, A4 = 4, A8 = 8}
.
Safety
This is unsafe because it must only be implemented for zero-sized types. Do not implement this trait. The implementations in this module should be the only implementations.