rustc_abi

Trait 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§

Source

fn ty_and_layout_for_variant( this: TyAndLayout<'a, Self>, cx: &C, variant_index: VariantIdx, ) -> TyAndLayout<'a, Self>

Source

fn ty_and_layout_field( this: TyAndLayout<'a, Self>, cx: &C, i: usize, ) -> TyAndLayout<'a, Self>

Source

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

fn is_unit(this: TyAndLayout<'a, Self>) -> bool

Source

fn is_transparent(this: TyAndLayout<'a, Self>) -> bool

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§