pub struct AbiAndPrefAlign {
pub abi: Align,
pub pref: Align,
}
Expand description
A pair of alignments, ABI-mandated and preferred.
The “preferred” alignment is an LLVM concept that is virtually meaningless to Rust code: it is not exposed semantically to programmers nor can they meaningfully affect it. The only concern for us is that preferred alignment must not be less than the mandated alignment and thus in practice the two values are almost always identical.
An example of a rare thing actually affected by preferred alignment is aligning of statics. It is of effectively no consequence for layout in structs and on the stack.
Fields§
§abi: Align
§pref: Align
Implementations§
Source§impl AbiAndPrefAlign
impl AbiAndPrefAlign
pub fn new(align: Align) -> AbiAndPrefAlign
pub fn min(self, other: AbiAndPrefAlign) -> AbiAndPrefAlign
pub fn max(self, other: AbiAndPrefAlign) -> AbiAndPrefAlign
Trait Implementations§
Source§impl Clone for AbiAndPrefAlign
impl Clone for AbiAndPrefAlign
Source§fn clone(&self) -> AbiAndPrefAlign
fn clone(&self) -> AbiAndPrefAlign
Returns a copy 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 AbiAndPrefAlign
impl Debug for AbiAndPrefAlign
Source§impl Hash for AbiAndPrefAlign
impl Hash for AbiAndPrefAlign
Source§impl PartialEq for AbiAndPrefAlign
impl PartialEq for AbiAndPrefAlign
impl Copy for AbiAndPrefAlign
impl Eq for AbiAndPrefAlign
impl StructuralPartialEq for AbiAndPrefAlign
Auto Trait Implementations§
impl Freeze for AbiAndPrefAlign
impl RefUnwindSafe for AbiAndPrefAlign
impl Send for AbiAndPrefAlign
impl Sync for AbiAndPrefAlign
impl Unpin for AbiAndPrefAlign
impl UnwindSafe for AbiAndPrefAlign
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