Enum prolog_parser::ast::Term [−][src]
pub enum Term { AnonVar, Clause(Cell<RegType>, ClauseName, Vec<Box<Term>>, Option<Fixity>), Cons(Cell<RegType>, Box<Term>, Box<Term>), Constant(Cell<RegType>, Constant), Var(Cell<VarReg>, Rc<Var>), }
Variants
AnonVar
Clause(Cell<RegType>, ClauseName, Vec<Box<Term>>, Option<Fixity>)
Cons(Cell<RegType>, Box<Term>, Box<Term>)
Constant(Cell<RegType>, Constant)
Var(Cell<VarReg>, Rc<Var>)
Methods
impl Term
[src]
impl Term
pub fn to_constant(self) -> Option<Constant>
[src]
pub fn to_constant(self) -> Option<Constant>
pub fn first_arg(&self) -> Option<&Term>
[src]
pub fn first_arg(&self) -> Option<&Term>
pub fn name(&self) -> Option<ClauseName>
[src]
pub fn name(&self) -> Option<ClauseName>
pub fn arity(&self) -> usize
[src]
pub fn arity(&self) -> usize
Trait Implementations
impl PartialEq for Term
[src]
impl PartialEq for Term
fn eq(&self, other: &Term) -> bool
[src]
fn eq(&self, other: &Term) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Term) -> bool
[src]
fn ne(&self, other: &Term) -> bool
This method tests for !=
.
impl Eq for Term
[src]
impl Eq for Term
impl Clone for Term
[src]
impl Clone for Term