Trait rustc_target::abi::TyAbiInterface
source · pub trait TyAbiInterface<'a, C>: Sized {
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;
}
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
sourcefn ty_and_layout_for_variant(
fn ty_and_layout_for_variant(
this: TyAndLayout<'a, Self>,
cx: &C,
variant_index: VariantIdx
) -> TyAndLayout<'a, Self>
sourcefn ty_and_layout_field(
fn ty_and_layout_field(
this: TyAndLayout<'a, Self>,
cx: &C,
i: usize
) -> TyAndLayout<'a, Self>
sourcefn ty_and_layout_pointee_info_at(
fn ty_and_layout_pointee_info_at(
this: TyAndLayout<'a, Self>,
cx: &C,
offset: Size
) -> Option<PointeeInfo>
source
fn is_adt(this: TyAndLayout<'a, Self>) -> bool
source
fn is_never(this: TyAndLayout<'a, Self>) -> bool
source
fn is_tuple(this: TyAndLayout<'a, Self>) -> bool
source