trait ProbeChoice<'db>: Sized {
type Choice;
type FinalChoice;
// Required methods
fn with_impl_or_trait_item<'a>(
this: &mut ProbeContext<'a, 'db, Self>,
items: &[(Name, AssocItemId)],
callback: impl FnMut(&mut ProbeContext<'a, 'db, Self>, CandidateId),
);
fn consider_candidates(
this: &ProbeContext<'_, 'db, Self>,
self_ty: Ty<'db>,
candidates: Vec<&Candidate<'db>>,
) -> ControlFlow<Self::Choice>;
fn consider_private_candidates(
this: &mut ProbeContext<'_, 'db, Self>,
self_ty: Ty<'db>,
instantiate_self_ty_obligations: &[Obligation<'db, Predicate<'db>>],
);
fn map_choice_pick(
choice: Self::Choice,
f: impl FnOnce(Pick<'db>) -> Pick<'db>,
) -> Self::Choice;
fn check_by_value_method_shadowing(
this: &mut ProbeContext<'_, 'db, Self>,
by_value_pick: &Self::Choice,
step: &CandidateStep<'db>,
self_ty: Ty<'db>,
instantiate_self_ty_obligations: &[Obligation<'db, Predicate<'db>>],
) -> ControlFlow<Self::Choice>;
fn check_autorefed_method_shadowing(
this: &mut ProbeContext<'_, 'db, Self>,
autoref_pick: &Self::Choice,
step: &CandidateStep<'db>,
self_ty: Ty<'db>,
instantiate_self_ty_obligations: &[Obligation<'db, Predicate<'db>>],
) -> ControlFlow<Self::Choice>;
fn final_choice_from_err(err: MethodError<'db>) -> Self::FinalChoice;
fn choose(this: ProbeContext<'_, 'db, Self>) -> Self::FinalChoice;
}Required Associated Types§
type Choice
type FinalChoice
Required Methods§
Sourcefn with_impl_or_trait_item<'a>(
this: &mut ProbeContext<'a, 'db, Self>,
items: &[(Name, AssocItemId)],
callback: impl FnMut(&mut ProbeContext<'a, 'db, Self>, CandidateId),
)
fn with_impl_or_trait_item<'a>( this: &mut ProbeContext<'a, 'db, Self>, items: &[(Name, AssocItemId)], callback: impl FnMut(&mut ProbeContext<'a, 'db, Self>, CandidateId), )
Finds the method with the appropriate name (or return type, as the case may be).
fn consider_candidates( this: &ProbeContext<'_, 'db, Self>, self_ty: Ty<'db>, candidates: Vec<&Candidate<'db>>, ) -> ControlFlow<Self::Choice>
fn consider_private_candidates( this: &mut ProbeContext<'_, 'db, Self>, self_ty: Ty<'db>, instantiate_self_ty_obligations: &[Obligation<'db, Predicate<'db>>], )
fn map_choice_pick( choice: Self::Choice, f: impl FnOnce(Pick<'db>) -> Pick<'db>, ) -> Self::Choice
fn check_by_value_method_shadowing( this: &mut ProbeContext<'_, 'db, Self>, by_value_pick: &Self::Choice, step: &CandidateStep<'db>, self_ty: Ty<'db>, instantiate_self_ty_obligations: &[Obligation<'db, Predicate<'db>>], ) -> ControlFlow<Self::Choice>
fn check_autorefed_method_shadowing( this: &mut ProbeContext<'_, 'db, Self>, autoref_pick: &Self::Choice, step: &CandidateStep<'db>, self_ty: Ty<'db>, instantiate_self_ty_obligations: &[Obligation<'db, Predicate<'db>>], ) -> ControlFlow<Self::Choice>
fn final_choice_from_err(err: MethodError<'db>) -> Self::FinalChoice
fn choose(this: ProbeContext<'_, 'db, Self>) -> Self::FinalChoice
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.