pub struct Var { /* private fields */ }Expand description
Named logic variable.
The variable name is purely descriptive to help understanding. Any newly created variables is different from all previously created variables, even if they have the same name. However, variables can be copied, which preserves identity.
Implementations§
Trait Implementations§
Source§impl Structure for Var
impl Structure for Var
Source§fn occurs<'s>(&self, x: &Var, _s: &Substitution<'s>) -> bool
fn occurs<'s>(&self, x: &Var, _s: &Substitution<'s>) -> bool
Returns
true if self contains a variable that is equivalent
to x when considering substitution s.Source§fn unify<'s>(&self, v: &Value, s: Substitution<'s>) -> Option<Substitution<'s>>
fn unify<'s>(&self, v: &Value, s: Substitution<'s>) -> Option<Substitution<'s>>
Attempt to unify
self with Value v under substitution s.Source§fn walk_star(self: Arc<Self>, _: &Substitution<'_>) -> Value
fn walk_star(self: Arc<Self>, _: &Substitution<'_>) -> Value
Recursively replace any variables contained in
self with
their substituted values.Source§fn reify_s<'s>(&self, s: Substitution<'s>) -> Substitution<'s>
fn reify_s<'s>(&self, s: Substitution<'s>) -> Substitution<'s>
Substitute all variables that remain fresh in
self with reified variables.impl Copy for Var
impl Eq for Var
impl StructuralPartialEq for Var
Auto Trait Implementations§
impl Freeze for Var
impl RefUnwindSafe for Var
impl Send for Var
impl Sync for Var
impl Unpin for Var
impl UnsafeUnpin for Var
impl UnwindSafe for Var
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