pub trait Resolver {
type Choice: Debug;
// Required methods
fn resolve(
&mut self,
goal_id: TermId,
goal_term: AppTerm,
context: &mut ResolveContext<'_>,
) -> Option<Resolved<Self::Choice>>;
fn resume(
&mut self,
choice: &mut Self::Choice,
goal_id: TermId,
context: &mut ResolveContext<'_>,
) -> bool;
}Expand description
The resolver is responsible for solving goals, e.g. through unification of variables or decomposing them into smaller goals.
Required Associated Types§
Required Methods§
fn resolve( &mut self, goal_id: TermId, goal_term: AppTerm, context: &mut ResolveContext<'_>, ) -> Option<Resolved<Self::Choice>>
fn resume( &mut self, choice: &mut Self::Choice, goal_id: TermId, context: &mut ResolveContext<'_>, ) -> bool
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".