Struct rustc_target::abi::Layout [−][src]
pub struct Layout {
pub fields: FieldsShape,
pub variants: Variants,
pub abi: Abi,
pub largest_niche: Option<Niche>,
pub align: AbiAndPrefAlign,
pub size: Size,
}Fields
fields: FieldsShapeExpand description
Says where the fields are located within the layout.
variants: VariantsExpand description
Encodes information about multi-variant layouts.
Even with Multiple variants, a layout still has its own fields! Those are then
shared between all variants. One of them will be the discriminant,
but e.g. generators can have more.
To access all fields of this layout, both fields and the fields of the active variant
must be taken into account.
abi: AbiExpand description
The abi defines how this data is passed between functions, and it defines
value restrictions via valid_range.
Note that this is entirely orthogonal to the recursive structure defined by
variants and fields; for example, ManuallyDrop<Result<isize, isize>> has
Abi::ScalarPair! So, even with non-Aggregate abi, fields and variants
have to be taken into account to find all fields of this layout.
largest_niche: Option<Niche>Expand description
The leaf scalar with the largest number of invalid values
(i.e. outside of its valid_range), if it exists.
align: AbiAndPrefAlignsize: SizeImplementations
impl Layout[src]
impl Layout[src]pub fn scalar<C: HasDataLayout>(cx: &C, scalar: Scalar) -> Self[src]
Trait Implementations
impl<__CTX> HashStable<__CTX> for Layout where
__CTX: HashStableContext, [src]
impl<__CTX> HashStable<__CTX> for Layout where
__CTX: HashStableContext, [src]fn hash_stable(&self, __hcx: &mut __CTX, __hasher: &mut StableHasher)[src]
impl Eq for Layout[src]
impl StructuralEq for Layout[src]
impl StructuralPartialEq for Layout[src]
Auto Trait Implementations
impl RefUnwindSafe for Layout
impl Send for Layout
impl Sync for Layout
impl Unpin for Layout
impl UnwindSafe for Layout
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]pub fn borrow_mut(&mut self) -> &mut T[src]
pub fn borrow_mut(&mut self) -> &mut T[src]Mutably borrows from an owned value. Read more
impl<T> MaybeResult<T> for T[src]
impl<T> MaybeResult<T> for T[src]