pub enum Term {
Var(u32),
Fun(String, Vec<Term>),
}Expand description
A first-order term over a signature.
Variants§
Implementations§
Source§impl Term
impl Term
Sourcepub fn apply(&self, subst: &Substitution) -> Term
pub fn apply(&self, subst: &Substitution) -> Term
Apply a substitution to this term.
Sourcepub fn contains(&self, other: &Term) -> bool
pub fn contains(&self, other: &Term) -> bool
Returns true if the term other occurs in this term.
Sourcepub fn subterm_at(&self, pos: &[usize]) -> Option<&Term>
pub fn subterm_at(&self, pos: &[usize]) -> Option<&Term>
Returns the subterm at the given position (empty = root).
Sourcepub fn replace_at(&self, pos: &[usize], replacement: Term) -> Term
pub fn replace_at(&self, pos: &[usize], replacement: Term) -> Term
Replace the subterm at pos with replacement, returning the new term.
Trait Implementations§
impl Eq for Term
impl StructuralPartialEq for Term
Auto Trait Implementations§
impl Freeze 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<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