Macro rkyv::offset_of_tuple[][src]

macro_rules! offset_of_tuple {
    ($parent:ty, $field:tt) => { ... };
}
Expand description

Calculates the offset of the specified field from the start of the tuple.

Examples

#[macro_use]
extern crate memoffset;

fn main() {
    assert!(offset_of_tuple!((u8, u32), 1) >= 0, "Tuples do not have a defined layout");
}