Skip to main content

RegionUtilitiesExt

Trait RegionUtilitiesExt 

Source
pub trait RegionUtilitiesExt<'tcx> {
Show 13 methods // Required methods fn get_name(self, tcx: TyCtxt<'tcx>) -> Option<Symbol>; fn get_name_or_anon(self, tcx: TyCtxt<'tcx>) -> Symbol; fn is_named(self, tcx: TyCtxt<'tcx>) -> bool; fn is_error(self) -> bool; fn is_static(self) -> bool; fn is_erased(self) -> bool; fn is_placeholder(self) -> bool; fn bound_at_or_above_binder(self, index: DebruijnIndex) -> bool; fn is_param(self) -> bool; fn is_free(self) -> bool; fn is_var(self) -> bool; fn as_var(self) -> RegionVid; fn opt_param_def_id( self, tcx: TyCtxt<'tcx>, binding_item: DefId, ) -> Option<DefId>;
}
Expand description

Region utilities

Required Methods§

Source

fn get_name(self, tcx: TyCtxt<'tcx>) -> Option<Symbol>

Source

fn get_name_or_anon(self, tcx: TyCtxt<'tcx>) -> Symbol

Source

fn is_named(self, tcx: TyCtxt<'tcx>) -> bool

Is this region named by the user?

Source

fn is_error(self) -> bool

Source

fn is_static(self) -> bool

Source

fn is_erased(self) -> bool

Source

fn is_placeholder(self) -> bool

Source

fn bound_at_or_above_binder(self, index: DebruijnIndex) -> bool

Source

fn is_param(self) -> bool

True for free regions other than 'static.

Source

fn is_free(self) -> bool

True for free region in the current context.

This is the case for 'static and param regions.

Source

fn is_var(self) -> bool

Source

fn as_var(self) -> RegionVid

Source

fn opt_param_def_id( self, tcx: TyCtxt<'tcx>, binding_item: DefId, ) -> Option<DefId>

Given some item binding_item, check if this region is a generic parameter introduced by it or one of the parent generics. Returns the DefId of the parameter definition if so.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<'tcx> RegionUtilitiesExt<'tcx> for Region<'tcx>