Struct ra_ap_hir_ty::TyLoweringContext
source · pub struct TyLoweringContext<'a> {
pub db: &'a dyn HirDatabase,
pub type_param_mode: ParamLoweringMode,
/* private fields */
}
Fields§
§db: &'a dyn HirDatabase
§type_param_mode: ParamLoweringMode
Note: Conceptually, it’s thinkable that we could be in a location where some type params should be represented as placeholders, and others should be converted to variables. I think in practice, this isn’t possible currently, so this should be fine for now.
Implementations§
source§impl<'a> TyLoweringContext<'a>
impl<'a> TyLoweringContext<'a>
pub fn new( db: &'a dyn HirDatabase, resolver: &'a Resolver, owner: TypeOwnerId ) -> Self
pub fn new_maybe_unowned( db: &'a dyn HirDatabase, resolver: &'a Resolver, owner: Option<TypeOwnerId> ) -> Self
pub fn with_debruijn<T>( &self, debruijn: DebruijnIndex, f: impl FnOnce(&TyLoweringContext<'_>) -> T ) -> T
pub fn with_shifted_in<T>( &self, debruijn: DebruijnIndex, f: impl FnOnce(&TyLoweringContext<'_>) -> T ) -> T
pub fn with_impl_trait_mode( self, impl_trait_mode: ImplTraitLoweringMode ) -> Self
pub fn with_type_param_mode(self, type_param_mode: ParamLoweringMode) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<'a> !Freeze for TyLoweringContext<'a>
impl<'a> !RefUnwindSafe for TyLoweringContext<'a>
impl<'a> !Send for TyLoweringContext<'a>
impl<'a> !Sync for TyLoweringContext<'a>
impl<'a> Unpin for TyLoweringContext<'a>
impl<'a> !UnwindSafe for TyLoweringContext<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> Cast for T
impl<T> Cast for T
source§fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
fn cast<U>(self, interner: <U as HasInterner>::Interner) -> Uwhere
Self: CastTo<U>,
U: HasInterner,
Cast a value to type
U
using CastTo
.