Module get_field_offset

Source
Expand description

Trait for getting the FieldOffset of a field, and related items.

One would implement the ImplsGetFieldOffset and GetFieldOffset traits, and use GetPubFieldOffset as a bound.

Structs§

FieldOffsetWithVis
A wrapper around a FieldOffset, with a visibility type parameter (whether the field is pub or not).
ImplGetNestedFieldOffset
Hack use by repr_offset to implement GetFieldOffset<(N0, N1, ...)> for all types without blowing up the time that cargo doc takes to run.

Traits§

GetFieldOffset
For getting the offset of a field given its name.
GetPubFieldOffset
An alias of the GetFieldOffset trait for public fields.
ImplsGetFieldOffset
Marker trait for types that implement GetFieldOffset.

Type Aliases§

FieldAlignment
Gets the alignment of a public field in the GetPubFieldOffset<FN> impl for This.
FieldPrivacy
Gets the privacy of a field in the GetFieldOffset<FN> impl for This.
FieldType
Gets the type of a public field in the GetPubFieldOffset<FN> impl for This.
PrivFieldAlignment
Gets the alignment of a (potentially) private field in the GetFieldOffset<FN> impl for This.
PrivFieldType
Gets the type of a (potentially) private field in the GetFieldOffset<FN> impl for This.