pub struct Alignments { /* private fields */ }
Expand description
Alignment for various types in memory. See LLVM 14 docs on Data Layout
Implementations§
Source§impl Alignments
impl Alignments
Sourcepub fn type_alignment(&self, ty: &Type) -> &Alignment
pub fn type_alignment(&self, ty: &Type) -> &Alignment
Alignment of the given type (in bits)
Sourcepub fn int_alignment(&self, size: u32) -> &Alignment
pub fn int_alignment(&self, size: u32) -> &Alignment
Alignment of the integer type of the given size (in bits)
Sourcepub fn vec_alignment(&self, size: u32) -> &Alignment
pub fn vec_alignment(&self, size: u32) -> &Alignment
Alignment of the vector type of the given total size (in bits)
Sourcepub fn fp_alignment(&self, fpt: FPType) -> &Alignment
pub fn fp_alignment(&self, fpt: FPType) -> &Alignment
Alignment of the given floating-point type
Sourcepub fn agg_alignment(&self) -> &Alignment
pub fn agg_alignment(&self) -> &Alignment
Alignment of aggregate types (structs, arrays)
Sourcepub fn fptr_alignment(&self) -> &FunctionPtrAlignment
pub fn fptr_alignment(&self) -> &FunctionPtrAlignment
Alignment of function pointers
Sourcepub fn ptr_alignment(&self, addr_space: AddrSpace) -> &PointerLayout
pub fn ptr_alignment(&self, addr_space: AddrSpace) -> &PointerLayout
Alignment of (non-function-pointer) pointers in the given address space
Trait Implementations§
Source§impl Clone for Alignments
impl Clone for Alignments
Source§fn clone(&self) -> Alignments
fn clone(&self) -> Alignments
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for Alignments
impl Debug for Alignments
Auto Trait Implementations§
impl Freeze for Alignments
impl RefUnwindSafe for Alignments
impl Send for Alignments
impl Sync for Alignments
impl Unpin for Alignments
impl UnwindSafe for Alignments
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more