pub unsafe trait Unifiable {
// Required method
fn unify(&self, term: &Term<'_>) -> bool;
}
Expand description
Trait for term unification.
Safety
This is marked unsafe because in order to do term unification, we must be sure that
- the term is created on the engine which is currently active
- the given context is a context for this engine
Not checking those preconditions results in undefined
behavior. Therefore, care must be taken to ensure that unify
is
actually safe.
The macro [unifiable!] provides a way to safely implement this trait by doing the precondition checks for you.
Required Methods§
sourcefn unify(&self, term: &Term<'_>) -> bool
fn unify(&self, term: &Term<'_>) -> bool
Unify this data with the given term reference.
You’d generally not use this directly, but rather, go through Term::unify.