Enum Term
Source pub enum Term {
Var(usize),
App {
op: String,
args: Vec<Term>,
},
}
Expand description
A term in a term algebra: either a variable or a function application.
A variable with an index.
An application of an operation symbol to subterms.
Construct a variable term.
Construct a function application term.
Construct a constant term (arity-0 operation).
Return the depth (maximum nesting) of this term.
Return the set of variable indices appearing in this term.
Substitute variable var_idx with replacement throughout this term.
Evaluate this term in a given algebra, given an assignment of variables to carrier elements.
Performs copy-assignment from
source.
Read more
Formats the value using the given formatter.
Read more
Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more
Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From<T> for U chooses to do.
The equivalence relation.
Reflexivity of the equivalence.
Symmetry: if self ~ other then other ~ self.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more
Uses borrowed data to replace owned data, usually by cloning.
Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.