Struct rustc_target::abi::TyLayout [−][src]
pub struct TyLayout<'a, Ty> {
pub ty: Ty,
pub details: &'a LayoutDetails,
}🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
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
ty: Ty
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
details: &'a LayoutDetails
🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods
impl<'a, Ty> TyLayout<'a, Ty>[src]
impl<'a, Ty> TyLayout<'a, Ty>fn is_aggregate(&self) -> bool[src]
fn is_aggregate(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
fn homogeneous_aggregate<C>(&self, cx: C) -> Option<Reg> where
Ty: TyLayoutMethods<'a, C> + Copy,
C: LayoutOf<Ty = Ty, TyLayout = Self> + Copy, [src]
fn homogeneous_aggregate<C>(&self, cx: C) -> Option<Reg> where
Ty: TyLayoutMethods<'a, C> + Copy,
C: LayoutOf<Ty = Ty, TyLayout = Self> + Copy, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'a, Ty> TyLayout<'a, Ty>[src]
impl<'a, Ty> TyLayout<'a, Ty>pub fn for_variant<C>(self, cx: C, variant_index: usize) -> Self where
Ty: TyLayoutMethods<'a, C>,
C: LayoutOf<Ty = Ty>, [src]
pub fn for_variant<C>(self, cx: C, variant_index: usize) -> Self where
Ty: TyLayoutMethods<'a, C>,
C: LayoutOf<Ty = Ty>, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
pub fn field<C>(self, cx: C, i: usize) -> C::TyLayout where
Ty: TyLayoutMethods<'a, C>,
C: LayoutOf<Ty = Ty>, [src]
pub fn field<C>(self, cx: C, i: usize) -> C::TyLayout where
Ty: TyLayoutMethods<'a, C>,
C: LayoutOf<Ty = Ty>, 🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
impl<'a, Ty> TyLayout<'a, Ty>[src]
impl<'a, Ty> TyLayout<'a, Ty>pub fn is_unsized(&self) -> bool[src]
pub fn is_unsized(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Returns true if the layout corresponds to an unsized type.
pub fn is_zst(&self) -> bool[src]
pub fn is_zst(&self) -> bool🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Returns true if the type is a ZST and not unsized.
pub fn size_and_align(&self) -> (Size, Align)[src]
pub fn size_and_align(&self) -> (Size, Align)🔬 This is a nightly-only experimental API. (rustc_private)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml instead?
Methods from Deref<Target = &'a LayoutDetails>
Trait Implementations
impl<'a, Ty: Copy> Copy for TyLayout<'a, Ty>[src]
impl<'a, Ty: Copy> Copy for TyLayout<'a, Ty>impl<'a, Ty: Clone> Clone for TyLayout<'a, Ty>[src]
impl<'a, Ty: Clone> Clone for TyLayout<'a, Ty>fn clone(&self) -> TyLayout<'a, Ty>[src]
fn clone(&self) -> TyLayout<'a, Ty>Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0[src]
fn clone_from(&mut self, source: &Self)Performs copy-assignment from source. Read more
impl<'a, Ty: Debug> Debug for TyLayout<'a, Ty>[src]
impl<'a, Ty: Debug> Debug for TyLayout<'a, Ty>fn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl<'a, Ty> Deref for TyLayout<'a, Ty>[src]
impl<'a, Ty> Deref for TyLayout<'a, Ty>type Target = &'a LayoutDetails
The resulting type after dereferencing.
fn deref(&self) -> &&'a LayoutDetails[src]
fn deref(&self) -> &&'a LayoutDetailsDereferences the value.