Skip to main content

PolyTraitDeclRef

Type Alias PolyTraitDeclRef 

Source
pub type PolyTraitDeclRef = RegionBinder<TraitDeclRef>;
Expand description

A quantified trait predicate, e.g. for<'a> Type<'a>: Trait<'a, Args>.

Aliased Type§

pub struct PolyTraitDeclRef {
    pub regions: IndexVec<RegionId, RegionParam>,
    pub regions_outlive: Vec<RegionBinder<OutlivesPred<Region, Region>>>,
    pub types_outlive: Vec<RegionBinder<OutlivesPred<Ty, Region>>>,
    pub skip_binder: TraitDeclRef,
}

Fields§

§regions: IndexVec<RegionId, RegionParam>§regions_outlive: Vec<RegionBinder<OutlivesPred<Region, Region>>>

Outlives relations involving the bound regions.

§types_outlive: Vec<RegionBinder<OutlivesPred<Ty, Region>>>

Outlives relations involving the bound regions.

§skip_binder: TraitDeclRef

Named this way to highlight accesses to the inner value that might be handling parameters incorrectly. Prefer using helper methods.

Implementations§

Source§

impl PolyTraitDeclRef

Source

pub fn identity_region_args(&self) -> RegionArgs

The region arguments at depth 0 corresponding to this tref’s bound regions.

Source§

impl PolyTraitDeclRef

Source

fn format_as_pred<'a, C: AstFormatter + 'a>( &'a self, ctx: &'a C, ) -> impl Display + 'a

Trait Implementations§

Source§

impl<C: AstFormatter> FmtWithCtx<C> for PolyTraitDeclRef

Source§

fn fmt_with_ctx(&self, ctx: &C, f: &mut Formatter<'_>) -> Result

Source§

fn with_ctx<'a>(&'a self, ctx: &'a C) -> WithCtx<'a, C, Self>

Returns a struct that implements Display. This allows the following: Read more
Source§

fn to_string_with_ctx(&self, ctx: &C) -> String