pub(crate) struct InspectGoal<'a, 'db> {
infcx: &'a SolverContext<'db>,
depth: usize,
orig_values: Vec<GenericArg<'db>>,
goal: Goal<'db, Predicate<'db>>,
result: Result<Certainty, NoSolution>,
final_revision: Probe<DbInterner<'db>>,
normalizes_to_term_hack: Option<NormalizesToTermHack<'db>>,
source: GoalSource,
}Fields§
§infcx: &'a SolverContext<'db>§depth: usize§orig_values: Vec<GenericArg<'db>>§goal: Goal<'db, Predicate<'db>>§result: Result<Certainty, NoSolution>§final_revision: Probe<DbInterner<'db>>§normalizes_to_term_hack: Option<NormalizesToTermHack<'db>>§source: GoalSourceImplementations§
Source§impl<'a, 'db> InspectGoal<'a, 'db>
impl<'a, 'db> InspectGoal<'a, 'db>
pub(crate) fn infcx(&self) -> &'a InferCtxt<'db>
pub(crate) fn goal(&self) -> Goal<'db, Predicate<'db>>
pub(crate) fn result(&self) -> Result<Certainty, NoSolution>
pub(crate) fn source(&self) -> GoalSource
pub(crate) fn depth(&self) -> usize
fn candidates_recur( &'a self, candidates: &mut Vec<InspectCandidate<'a, 'db>>, steps: &mut Vec<&'a ProbeStep<DbInterner<'db>>>, probe: &'a Probe<DbInterner<'db>>, )
pub(crate) fn candidates(&'a self) -> Vec<InspectCandidate<'a, 'db>>
Sourcepub(crate) fn unique_applicable_candidate(
&'a self,
) -> Option<InspectCandidate<'a, 'db>>
pub(crate) fn unique_applicable_candidate( &'a self, ) -> Option<InspectCandidate<'a, 'db>>
Returns the single candidate applicable for the current goal, if it exists.
Returns None if there are either no or multiple applicable candidates.
pub(crate) fn new( infcx: &'a InferCtxt<'db>, depth: usize, root: GoalEvaluation<DbInterner<'db>>, term_hack_and_nested_certainty: Option<(NormalizesToTermHack<'db>, Result<Certainty, NoSolution>)>, source: GoalSource, ) -> Self
pub(crate) fn visit_with<V: ProofTreeVisitor<'db>>( &self, visitor: &mut V, ) -> V::Result
Trait Implementations§
Auto Trait Implementations§
impl<'a, 'db> Freeze for InspectGoal<'a, 'db>
impl<'a, 'db> !RefUnwindSafe for InspectGoal<'a, 'db>
impl<'a, 'db> !Send for InspectGoal<'a, 'db>
impl<'a, 'db> !Sync for InspectGoal<'a, 'db>
impl<'a, 'db> Unpin for InspectGoal<'a, 'db>
impl<'a, 'db> UnsafeUnpin for InspectGoal<'a, 'db>
impl<'a, 'db> !UnwindSafe for InspectGoal<'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