#[derive(FieldOffsets)]
Expand description

Derive macro calculates field offsets.

The type must be a struct and must implement Pod or an error is raised.

The derive macro adds an associated constant FIELD_OFFSETS to the type. FIELD_OFFSETS is an instance of a struct with usize fields for every field in the type. The value of each field is the offset of that field in the type.