pub struct Resolver<'env, 'db> {
db: &'db dyn Db,
env: &'env mut Env<'db>,
memoized_ty: Map<InferVarIndex, Result<SymTy<'db>, ResolverCycle>>,
memoized_perm: Map<InferVarIndex, SymPerm<'db>>,
}Fields§
§db: &'db dyn Db§env: &'env mut Env<'db>§memoized_ty: Map<InferVarIndex, Result<SymTy<'db>, ResolverCycle>>§memoized_perm: Map<InferVarIndex, SymPerm<'db>>Implementations§
Source§impl<'env, 'db> Resolver<'env, 'db>
impl<'env, 'db> Resolver<'env, 'db>
pub fn new(env: &'env mut Env<'db>) -> Self
Sourcepub fn resolve<T>(&mut self, term: T) -> T::Outputwhere
T: Subst<'db, GenericTerm = SymGenericTerm<'db>>,
pub fn resolve<T>(&mut self, term: T) -> T::Outputwhere
T: Subst<'db, GenericTerm = SymGenericTerm<'db>>,
Return a version of term in which all inference variables are (deeply) removed.
Sourcefn resolve_infer_var(
&mut self,
infer: InferVarIndex,
) -> Result<SymGenericTerm<'db>, ResolverCycle>
fn resolve_infer_var( &mut self, infer: InferVarIndex, ) -> Result<SymGenericTerm<'db>, ResolverCycle>
Resolve an inference variable to a generic term, given the variance of the location in which it appears
fn resolve_ty_var( &mut self, infer: InferVarIndex, ) -> Result<SymTy<'db>, ResolverCycle>
Sourcefn bounding_ty(
&mut self,
infer: InferVarIndex,
direction: Direction,
) -> Result<Option<SymTy<'db>>, ResolverCycle>
fn bounding_ty( &mut self, infer: InferVarIndex, direction: Direction, ) -> Result<Option<SymTy<'db>>, ResolverCycle>
Return the bounding type on the type inference variable v from the given direction.
fn resolve_perm_var(&mut self, infer: InferVarIndex) -> SymPerm<'db>
Sourcefn bounding_perm(
&self,
infer: InferVarIndex,
direction: Direction,
) -> Option<SymPerm<'db>>
fn bounding_perm( &self, infer: InferVarIndex, direction: Direction, ) -> Option<SymPerm<'db>>
Return the bounding perm on the permission inference variable v from the given direction.
fn report(&self, infer: InferVarIndex, _err: ResolverCycle) -> Reported
Auto Trait Implementations§
impl<'env, 'db> Freeze for Resolver<'env, 'db>
impl<'env, 'db> !RefUnwindSafe for Resolver<'env, 'db>
impl<'env, 'db> !Send for Resolver<'env, 'db>
impl<'env, 'db> !Sync for Resolver<'env, 'db>
impl<'env, 'db> Unpin for Resolver<'env, 'db>
impl<'env, 'db> UnsafeUnpin for Resolver<'env, 'db>
impl<'env, 'db> !UnwindSafe for Resolver<'env, 'db>
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more