pub struct TargetData { /* private fields */ }
Expand description
A wrapper around a LLVMTargetDataRef
Implementations§
Source§impl TargetData
impl TargetData
Sourcepub fn byte_order(&self) -> ByteOrdering
pub fn byte_order(&self) -> ByteOrdering
Returns the byte order of this data layout
Sourcepub fn size_of_ptr(&self) -> u64
pub fn size_of_ptr(&self) -> u64
Returns the size of a pointer
Sourcepub fn bit_size_of_ptr(&self) -> u64
pub fn bit_size_of_ptr(&self) -> u64
Returns the size of a pointer in bits
Sourcepub fn offset_of_element(&self, ty: Type, index: u32) -> u64
pub fn offset_of_element(&self, ty: Type, index: u32) -> u64
Returns the byte offset of an element in a struct
Sourcepub fn element_at_offset(&self, ty: Type, offset: u64) -> u32
pub fn element_at_offset(&self, ty: Type, offset: u64) -> u32
Returns the element at a byte offset in a struct
Sourcepub fn bit_size_of(&self, ty: Type) -> u64
pub fn bit_size_of(&self, ty: Type) -> u64
Returns the size of a type in bits
Sourcepub fn store_size_of(&self, ty: Type) -> u64
pub fn store_size_of(&self, ty: Type) -> u64
Returns the size of a type when stored
Sourcepub fn abi_alignment_of(&self, ty: Type) -> u32
pub fn abi_alignment_of(&self, ty: Type) -> u32
Returns the ABI alignment of a type
Sourcepub fn call_frame_alignment_of(&self, ty: Type) -> u32
pub fn call_frame_alignment_of(&self, ty: Type) -> u32
Returns the ABI alignment of a type
Sourcepub fn preferred_alignment_of(&self, ty: Type) -> u32
pub fn preferred_alignment_of(&self, ty: Type) -> u32
Returns the preferred alignment of a type
Trait Implementations§
Source§impl Clone for TargetData
impl Clone for TargetData
Source§fn clone(&self) -> TargetData
fn clone(&self) -> TargetData
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 TargetData
impl Debug for TargetData
Source§impl Display for TargetData
impl Display for TargetData
Auto Trait Implementations§
impl Freeze for TargetData
impl RefUnwindSafe for TargetData
impl !Send for TargetData
impl !Sync for TargetData
impl Unpin for TargetData
impl UnwindSafe for TargetData
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