C has offsetof
, is there some way to do this in Rust?
Even though the order may change between compilations (unless repr(C)
is used), for a given complication it should be possible to access the offset of a struct
member at compile time.
Whats the best way find this offset in Rust?