Trait rustc_target::abi::TyAbiInterface
source · pub trait TyAbiInterface<'a, C>: Sized + Debug {
// Required methods
fn ty_and_layout_for_variant(
this: TyAndLayout<'a, Self>,
cx: &C,
variant_index: VariantIdx
) -> TyAndLayout<'a, Self>;
fn ty_and_layout_field(
this: TyAndLayout<'a, Self>,
cx: &C,
i: usize
) -> TyAndLayout<'a, Self>;
fn ty_and_layout_pointee_info_at(
this: TyAndLayout<'a, Self>,
cx: &C,
offset: Size
) -> Option<PointeeInfo>;
fn is_adt(this: TyAndLayout<'a, Self>) -> bool;
fn is_never(this: TyAndLayout<'a, Self>) -> bool;
fn is_tuple(this: TyAndLayout<'a, Self>) -> bool;
fn is_unit(this: TyAndLayout<'a, Self>) -> bool;
fn is_transparent(this: TyAndLayout<'a, Self>) -> bool;
}
Expand description
Trait that needs to be implemented by the higher-level type representation
(e.g. rustc_middle::ty::Ty
), to provide rustc_target::abi
functionality.
Required Methods§
fn ty_and_layout_for_variant( this: TyAndLayout<'a, Self>, cx: &C, variant_index: VariantIdx ) -> TyAndLayout<'a, Self>
fn ty_and_layout_field( this: TyAndLayout<'a, Self>, cx: &C, i: usize ) -> TyAndLayout<'a, Self>
fn ty_and_layout_pointee_info_at( this: TyAndLayout<'a, Self>, cx: &C, offset: Size ) -> Option<PointeeInfo>
fn is_adt(this: TyAndLayout<'a, Self>) -> bool
fn is_never(this: TyAndLayout<'a, Self>) -> bool
fn is_tuple(this: TyAndLayout<'a, Self>) -> bool
fn is_unit(this: TyAndLayout<'a, Self>) -> bool
fn is_transparent(this: TyAndLayout<'a, Self>) -> bool
Object Safety§
This trait is not object safe.