Enum repc_impl::layout::Annotation [−][src]
Expand description
An annotation of a type or field.
Builtin types, arrays, and opaque types cannot be annotated.
Variants
PragmaPack(u64)
Tuple Fields
0: u64
The PragmaPack
annotation.
This cannot be used on fields. At most one of these can be used on a type.
If the argument is n
, it corresponds to #pragma pack(n/8)
in C.
If n
is not a multiple of 8, this annotation will be ignored.
AttrPacked
The AttrPacked
annotation.
This corresponds to __attribute__((packed))
in C. On MSVC targets, the behavior
is the behavior of Clang.
Align(Option<u64>)
The Aligned
annotation.
If the argument is Some(n)
, n
must be a power of two and at least 8. It is the
corresponding C argument but in bits instead of bytes.
If the argument is Some(n)
, it corresponds to __declspec(align(n/8))
on MSVC
targets and __attribute__((aligned(n/8)))
otherwise.
If the argument is None
, it corresponds to __attribute__((aligned))
. On MSVC
targets, the behavior is the behavior of Clang.
Trait Implementations
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for Annotation
impl Send for Annotation
impl Sync for Annotation
impl Unpin for Annotation
impl UnwindSafe for Annotation
Blanket Implementations
Mutably borrows from an owned value. Read more