Struct chalk_recursive::recursive::Solver
source · struct Solver<'me, I: Interner> {
program: &'me dyn RustIrDatabase<I>,
context: &'me mut RecursiveContext<UCanonicalGoal<I>, Fallible<Solution<I>>>,
}
Expand description
A Solver is the basic context in which you can propose goals for a given program. All questions posed to the solver are in canonical, closed form, so that each question is answered with effectively a “clean slate”. This allows for better caching, and simplifies management of the inference context.
Fields§
§program: &'me dyn RustIrDatabase<I>
§context: &'me mut RecursiveContext<UCanonicalGoal<I>, Fallible<Solution<I>>>
Implementations§
source§impl<'me, I: Interner> Solver<'me, I>
impl<'me, I: Interner> Solver<'me, I>
pub(crate) fn new( context: &'me mut RecursiveContext<UCanonicalGoal<I>, Fallible<Solution<I>>>, program: &'me dyn RustIrDatabase<I>, ) -> Self
Trait Implementations§
source§impl<'me, I: Interner> SolveDatabase<I> for Solver<'me, I>
impl<'me, I: Interner> SolveDatabase<I> for Solver<'me, I>
Auto Trait Implementations§
impl<'me, I> Freeze for Solver<'me, I>
impl<'me, I> !RefUnwindSafe for Solver<'me, I>
impl<'me, I> !Send for Solver<'me, I>
impl<'me, I> !Sync for Solver<'me, I>
impl<'me, I> Unpin for Solver<'me, I>
impl<'me, I> !UnwindSafe for Solver<'me, I>
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