[][src]Struct fast_rustc_ap_rustc_target::abi::LayoutDetails

pub struct LayoutDetails {
    pub fields: FieldPlacement,
    pub variants: Variants,
    pub abi: Abi,
    pub largest_niche: Option<Niche>,
    pub align: AbiAndPrefAlign,
    pub size: Size,
}

Fields

fields: FieldPlacement

Says where the fields are located within the layout. Primitives and uninhabited enums appear as unions without fields.

variants: Variants

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: Abi

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>

The leaf scalar with the largest number of invalid values (i.e. outside of its valid_range), if it exists.

align: AbiAndPrefAlignsize: Size

Methods

impl LayoutDetails[src]

pub fn scalar<C: HasDataLayout>(cx: &C, scalar: Scalar) -> Self[src]

Trait Implementations

impl Debug for LayoutDetails[src]

impl Eq for LayoutDetails[src]

impl Hash for LayoutDetails[src]

impl<__CTX> HashStable<__CTX> for LayoutDetails where
    __CTX: HashStableContext
[src]

impl PartialEq<LayoutDetails> for LayoutDetails[src]

impl StructuralEq for LayoutDetails[src]

impl StructuralPartialEq for LayoutDetails[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<E> SpecializationError for E[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.