[−][src]Struct rustc_target::abi::TyLayout
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
details: &'a LayoutDetails
Methods
impl<'a, Ty> TyLayout<'a, Ty>
[src]
impl<'a, Ty> TyLayout<'a, Ty>
pub fn for_variant<C>(self, cx: &C, variant_index: VariantIdx) -> Self where | [src] |
pub fn field<C>(self, cx: &C, i: usize) -> C::TyLayout where | [src] |
impl<'a, Ty> TyLayout<'a, Ty>
[src]
impl<'a, Ty> TyLayout<'a, Ty>
pub fn is_unsized(&self) -> bool | [src] |
Returns true if the layout corresponds to an unsized type.
pub fn is_zst(&self) -> bool | [src] |
Returns true if the type is a ZST and not unsized.
Methods from Deref<Target = &'a LayoutDetails>
Trait Implementations
impl<'a, Ty: Eq> Eq for TyLayout<'a, Ty>
[src]
impl<'a, Ty: Eq> Eq for TyLayout<'a, Ty>
impl<'a, Ty: Copy> Copy for TyLayout<'a, Ty>
[src]
impl<'a, Ty: Copy> Copy for TyLayout<'a, Ty>
impl<'a, Ty: PartialEq> PartialEq<TyLayout<'a, Ty>> for TyLayout<'a, Ty>
[src]
impl<'a, Ty: PartialEq> PartialEq<TyLayout<'a, Ty>> for TyLayout<'a, Ty>
fn eq(&self, other: &TyLayout<'a, Ty>) -> bool | [src] |
fn ne(&self, other: &TyLayout<'a, Ty>) -> bool | [src] |
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_from(&mut self, source: &Self) | 1.0.0 [src] |
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>
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] |
impl<'a, Ty: Hash> Hash for TyLayout<'a, Ty>
[src]
impl<'a, Ty: Hash> Hash for TyLayout<'a, Ty>
Auto Trait Implementations
impl<'a, Ty> Send for TyLayout<'a, Ty> where
Ty: Send,
impl<'a, Ty> Send for TyLayout<'a, Ty> where
Ty: Send,
impl<'a, Ty> Sync for TyLayout<'a, Ty> where
Ty: Sync,
impl<'a, Ty> Sync for TyLayout<'a, Ty> where
Ty: Sync,
Blanket Implementations
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error> | [src] |
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T | [src] |
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
🔬 This is a nightly-only experimental API. (
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error> | [src] |
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId | [src] |
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T