pub struct Solver<'a> { /* private fields */ }Implementations§
Source§impl<'a> Solver<'a>
impl<'a> Solver<'a>
Sourcepub fn new(
db: &'a CompiledDatabase,
goals: Vec<Term>,
query_vars: FnvHashMap<String, VarId>,
) -> Self
pub fn new( db: &'a CompiledDatabase, goals: Vec<Term>, query_vars: FnvHashMap<String, VarId>, ) -> Self
Create a new solver for a query against a compiled database.
pub fn with_limit(self, limit: usize) -> Self
pub fn with_max_depth(self, max_depth: usize) -> Self
Sourcepub fn interner(&self) -> &StringInterner
pub fn interner(&self) -> &StringInterner
Get the solver’s interner (includes any runtime-created atoms).
Sourcepub fn next(&mut self) -> SolveResult
pub fn next(&mut self) -> SolveResult
Get the next solution (or failure/error).
Sourcepub fn all_solutions_with_interner(
self,
) -> Result<(Vec<Solution>, StringInterner), String>
pub fn all_solutions_with_interner( self, ) -> Result<(Vec<Solution>, StringInterner), String>
Enumerate all solutions, returning the interner for term display.
Auto Trait Implementations§
impl<'a> Freeze for Solver<'a>
impl<'a> RefUnwindSafe for Solver<'a>
impl<'a> Send for Solver<'a>
impl<'a> Sync for Solver<'a>
impl<'a> Unpin for Solver<'a>
impl<'a> UnsafeUnpin for Solver<'a>
impl<'a> UnwindSafe for Solver<'a>
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