Struct llvm_support::align::TypeAlignSpec [−][src]
#[non_exhaustive]pub struct TypeAlignSpec {
pub aligned_type: AlignedType,
pub abi_alignment: Align,
pub preferred_alignment: Align,
}
Expand description
Represents an alignable type, along with its ABI-mandated and preferred alignments (which may differ).
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.aligned_type: AlignedType
The type being aligned.
abi_alignment: Align
The ABI-enforced alignment for the type.
preferred_alignment: Align
The preferred alignment for the type.
NOTE: This must be greater than or equal to the ABI alignment. This invariant is preserved during construction.
Implementations
The maximum type width, in bits, representable in this structure.
pub fn new(
aligned_type: AlignedType,
abi: Align,
pref: Align
) -> Result<Self, AlignSpecError>
pub fn new(
aligned_type: AlignedType,
abi: Align,
pref: Align
) -> Result<Self, AlignSpecError>
Create a new TypeAlignSpec
for the given AlignedType
and alignment
constraints.
Trait Implementations
This method returns an ordering between self
and other
values if one exists. Read more
This method tests less than (for self
and other
) and is used by the <
operator. Read more
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
Auto Trait Implementations
impl RefUnwindSafe for TypeAlignSpec
impl Send for TypeAlignSpec
impl Sync for TypeAlignSpec
impl Unpin for TypeAlignSpec
impl UnwindSafe for TypeAlignSpec
Blanket Implementations
Mutably borrows from an owned value. Read more