pub struct InferCtxtBuilder<'db> { /* private fields */ }
Expand description
Used to configure inference contexts before their creation.
Implementations§
Source§impl<'db> InferCtxtBuilder<'db>
impl<'db> InferCtxtBuilder<'db>
Sourcepub fn build_with_canonical<T>(
self,
input: &CanonicalQueryInput<'db, T>,
) -> (InferCtxt<'db>, T, CanonicalVarValues<'db>)where
T: TypeFoldable<DbInterner<'db>>,
pub fn build_with_canonical<T>(
self,
input: &CanonicalQueryInput<'db, T>,
) -> (InferCtxt<'db>, T, CanonicalVarValues<'db>)where
T: TypeFoldable<DbInterner<'db>>,
Given a canonical value C
as a starting point, create an
inference context that contains each of the bound values
within instantiated as a fresh variable. The f
closure is
invoked with the new infcx, along with the instantiated value
V
and a instantiation S
. This instantiation S
maps from
the bound values in C
to their instantiated values in V
(in other words, S(C) = V
).
pub fn build(&mut self, typing_mode: TypingMode<'db>) -> InferCtxt<'db>
Auto Trait Implementations§
impl<'db> Freeze for InferCtxtBuilder<'db>
impl<'db> !RefUnwindSafe for InferCtxtBuilder<'db>
impl<'db> Send for InferCtxtBuilder<'db>
impl<'db> Sync for InferCtxtBuilder<'db>
impl<'db> Unpin for InferCtxtBuilder<'db>
impl<'db> !UnwindSafe for InferCtxtBuilder<'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, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§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