Struct rustc_target::abi::TyLayout[][src]

pub struct TyLayout<'a, Ty> {
    pub ty: Ty,
    pub details: &'a LayoutDetails,
}

The details of the layout of a type, alongside the type itself. Provides various type traversal APIs (e.g. recursing into fields).

Note that the details are NOT guaranteed to always be identical to those obtained from layout_of(ty), as we need to produce layouts for which Rust types do not exist, such as enum variants or synthetic fields of enums (i.e. discriminants) and fat pointers.

Fields

Methods

impl<'a, Ty> TyLayout<'a, Ty>
[src]

impl<'a, Ty> TyLayout<'a, Ty>
[src]

Returns true if the layout corresponds to an unsized type.

Returns true if the type is a ZST and not unsized.

Methods from Deref<Target = &'a LayoutDetails>

Trait Implementations

impl<'a, Ty: Copy> Copy for TyLayout<'a, Ty>
[src]

impl<'a, Ty: Clone> Clone for TyLayout<'a, Ty>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a, Ty: Debug> Debug for TyLayout<'a, Ty>
[src]

Formats the value using the given formatter. Read more

impl<'a, Ty> Deref for TyLayout<'a, Ty>
[src]

The resulting type after dereferencing.

Dereferences the value.

Auto Trait Implementations

impl<'a, Ty> Send for TyLayout<'a, Ty> where
    Ty: Send

impl<'a, Ty> Sync for TyLayout<'a, Ty> where
    Ty: Sync