Expand description
This crate expose the FieldOffsets derive macro and the types it uses.
The macro allows to get const FieldOffset for member of a #[repr(C)] struct.
The FieldOffset type is re-exported from the field-offset crate.
Structs§
- Field
Offset - Represents a pointer to a field of type
Uwithin the typeT
Enums§
- Allow
Pin - Type that can be used in the
PinFlagparameter ofFieldOffsetto specify that this projection is valid on Pin types. See documentation ofFieldOffset::new_from_offset_pinned - NotPinned
- Type that can be used in the
PinFlagparameter ofFieldOffsetto specify that this projection is not valid on Pin types.
Traits§
- Pinned
Drop - This trait needs to be implemented if you use the
#[pin_drop]attribute. It enables you to implement Drop for your type safely.
Derive Macros§
- Field
Offsets - The macro FieldOffsets adds a
FIELD_OFFSETSassociated const to the struct. That is an object which has fields with the same name as the fields of the original struct, each field is of typeconst_field_offset::FieldOffset