pub enum Term {
Name(Name),
Variable(Variable),
Function(FunctionTerm),
}Expand description
A term, i.e. a Name, Variable or FunctionTerm.
§Usage
Used by GoalDescription, FunctionTerm,
FunctionHead, PrimitiveEffect and InitElement.
Variants§
Name(Name)
An object or constant name.
Variable(Variable)
A variable, e.g. ?x.
Function(FunctionTerm)
A function term, (<function-symbol> <term>*).
Implementations§
Source§impl Term
impl Term
Sourcepub const fn new_variable(var: Variable) -> Self
pub const fn new_variable(var: Variable) -> Self
Creates a variable term.
Sourcepub const fn new_function(fun: FunctionTerm) -> Self
pub const fn new_function(fun: FunctionTerm) -> Self
Creates a function term.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Term
Available on crate feature serde only.
impl<'de> Deserialize<'de> for Term
Available on crate feature
serde only.Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Term
Source§impl From<FunctionTerm> for Term
impl From<FunctionTerm> for Term
Source§fn from(value: FunctionTerm) -> Self
fn from(value: FunctionTerm) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Term
Auto Trait Implementations§
impl Forget for Term
impl Freeze for Term
impl Move for Term
impl RefUnwindSafe for Term
impl Send for Term
impl Sync for Term
impl Unpin for Term
impl UnsafeUnpin for Term
impl UnwindSafe for Term
Blanket Implementations§
Source§impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
impl<V, T, O> AcceptMut<V, T, O> for Twhere
V: VisitorMut<T, O>,
Source§fn accept_mut(&self, v: &mut V) -> O
fn accept_mut(&self, v: &mut V) -> O
Lets the mutable visitor
v visit self.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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Pretty for Twhere
T: PrettyVisit,
impl<T> Pretty for Twhere
T: PrettyVisit,
Source§impl<T> PrettyVisit for T
impl<T> PrettyVisit for T
Source§fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
fn to_doc(&self, r: &PrettyRenderer) -> RcDoc<'static>
Available on crate feature
pretty only.Builds the document for
self with the renderer r.