pub struct LpDatabase {
pub clauses: Vec<LpClause>,
}Expand description
A logic programming database of Horn clauses.
Fields§
§clauses: Vec<LpClause>All clauses, in order of assertion.
Implementations§
Source§impl LpDatabase
impl LpDatabase
Sourcepub fn query_all(&self, goal: LpTerm, cfg: &SolveConfig) -> Vec<Substitution>
pub fn query_all(&self, goal: LpTerm, cfg: &SolveConfig) -> Vec<Substitution>
Collect all solutions to a single-goal query.
Source§impl LpDatabase
impl LpDatabase
Sourcepub fn matching_clauses(&self, goal: &LpTerm) -> Vec<&LpClause>
pub fn matching_clauses(&self, goal: &LpTerm) -> Vec<&LpClause>
Return all clauses whose head functor/arity matches the given goal.
Trait Implementations§
Source§impl Clone for LpDatabase
impl Clone for LpDatabase
Source§fn clone(&self) -> LpDatabase
fn clone(&self) -> LpDatabase
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LpDatabase
impl Debug for LpDatabase
Source§impl Default for LpDatabase
impl Default for LpDatabase
Source§fn default() -> LpDatabase
fn default() -> LpDatabase
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for LpDatabase
impl RefUnwindSafe for LpDatabase
impl Send for LpDatabase
impl Sync for LpDatabase
impl Unpin for LpDatabase
impl UnsafeUnpin for LpDatabase
impl UnwindSafe for LpDatabase
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