pub struct MethodResolutionContext<'a, 'db> {
pub infcx: &'a InferCtxt<'db>,
pub resolver: &'a Resolver<'db>,
pub param_env: ParamEnv<'db>,
pub traits_in_scope: &'a FxHashSet<TraitId>,
pub edition: Edition,
pub features: &'a UnstableFeatures,
pub call_span: Span,
pub receiver_span: Span,
}Fields§
§infcx: &'a InferCtxt<'db>§resolver: &'a Resolver<'db>§param_env: ParamEnv<'db>§traits_in_scope: &'a FxHashSet<TraitId>§edition: Edition§features: &'a UnstableFeatures§call_span: Span§receiver_span: SpanImplementations§
Source§impl<'a, 'db> MethodResolutionContext<'a, 'db>
impl<'a, 'db> MethodResolutionContext<'a, 'db>
pub fn probe_for_name( &self, mode: Mode, item_name: Name, self_ty: Ty<'db>, ) -> Result<Pick<'db>, MethodError<'db>>
pub fn probe_all( &self, mode: Mode, self_ty: Ty<'db>, ) -> impl Iterator<Item = CandidateWithPrivate<'db>>
fn probe_op<Choice: ProbeChoice<'db>>( &self, mode: Mode, self_ty: Ty<'db>, choice: Choice, ) -> Choice::FinalChoice
fn method_autoderef_steps( &self, self_ty: &Canonical<'db, Ty<'db>>, ) -> MethodAutoderefStepsResult<'db>
Auto Trait Implementations§
impl<'a, 'db> Freeze for MethodResolutionContext<'a, 'db>
impl<'a, 'db> !RefUnwindSafe for MethodResolutionContext<'a, 'db>
impl<'a, 'db> !Send for MethodResolutionContext<'a, 'db>
impl<'a, 'db> !Sync for MethodResolutionContext<'a, 'db>
impl<'a, 'db> Unpin for MethodResolutionContext<'a, 'db>
impl<'a, 'db> UnsafeUnpin for MethodResolutionContext<'a, 'db>
impl<'a, 'db> !UnwindSafe for MethodResolutionContext<'a, '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