pub struct Clause {
pub id: ClauseId,
pub head: Expr,
pub body: Vec<Expr>,
pub source: Option<Origin>,
}Expand description
A parsed logic clause: a head goal plus an optional list of body goals.
A clause with an empty body is a fact; one with body goals is a rule.
Fields§
§id: ClauseIdIdentifier of this clause within its database.
head: ExprThe head goal (the conclusion the clause proves).
body: Vec<Expr>Body goals that must all hold for the head to hold; empty for a fact.
source: Option<Origin>Source origin of the clause, when known.
Implementations§
Trait Implementations§
impl Eq for Clause
impl StructuralPartialEq for Clause
Auto Trait Implementations§
impl Freeze for Clause
impl RefUnwindSafe for Clause
impl Send for Clause
impl Sync for Clause
impl Unpin for Clause
impl UnsafeUnpin for Clause
impl UnwindSafe for Clause
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.