pub enum BodyLiteral {
Positive(Atom),
Negated(Atom),
Epistemic(EpistemicLiteral),
Comparison(Comparison),
IsExpr(IsExpr),
Univ(Univ),
}Expand description
A literal in the body of a rule
Variants§
Positive(Atom)
Positive atom.
Negated(Atom)
Negated atom (not p(...)).
Epistemic(EpistemicLiteral)
Epistemic atom (know p(...), possible p(...), or negated form).
Comparison(Comparison)
Arithmetic comparison (e.g. X < Y).
IsExpr(IsExpr)
Is-expression binding (e.g. Z is X + Y).
Univ(Univ)
Finite univ relation (Term =.. Parts).
Implementations§
Source§impl BodyLiteral
impl BodyLiteral
Sourcepub fn is_positive(&self) -> bool
pub fn is_positive(&self) -> bool
Returns true if this is a positive literal.
Sourcepub fn is_negated(&self) -> bool
pub fn is_negated(&self) -> bool
Returns true if this is a negated literal.
Trait Implementations§
Source§impl Clone for BodyLiteral
impl Clone for BodyLiteral
Source§fn clone(&self) -> BodyLiteral
fn clone(&self) -> BodyLiteral
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 BodyLiteral
impl Debug for BodyLiteral
Source§impl PartialEq for BodyLiteral
impl PartialEq for BodyLiteral
impl StructuralPartialEq for BodyLiteral
Auto Trait Implementations§
impl Freeze for BodyLiteral
impl RefUnwindSafe for BodyLiteral
impl Send for BodyLiteral
impl Sync for BodyLiteral
impl Unpin for BodyLiteral
impl UnsafeUnpin for BodyLiteral
impl UnwindSafe for BodyLiteral
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