pub enum LpTerm {
Atom(String),
Var(String),
Compound {
functor: String,
args: Vec<LpTerm>,
},
Integer(i64),
Float(f64),
List(Vec<LpTerm>, Option<Box<LpTerm>>),
}Expand description
A Prolog-style term.
Variants§
Atom(String)
Atom: a ground constant, e.g. foo, [], true.
Var(String)
Variable: begins with uppercase or _, e.g. X, _Y.
Compound
Compound term: f(t1, ..., tn).
Integer(i64)
Integer literal.
Float(f64)
Float literal.
List(Vec<LpTerm>, Option<Box<LpTerm>>)
List [h1, h2, ... | Tail] — proper list when tail is None.
Implementations§
Trait Implementations§
impl StructuralPartialEq for LpTerm
Auto Trait Implementations§
impl Freeze for LpTerm
impl RefUnwindSafe for LpTerm
impl Send for LpTerm
impl Sync for LpTerm
impl Unpin for LpTerm
impl UnsafeUnpin for LpTerm
impl UnwindSafe for LpTerm
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