Expand description
A variable that can either be free or bound
Variants
Free(FreeVar<N>)
A free variable
Bound(BoundVar<N>)
A variable that is bound by a scope
Implementations
Trait Implementations
sourceimpl<N: Clone + PartialEq> BoundTerm<N> for Var<N>
impl<N: Clone + PartialEq> BoundTerm<N> for Var<N>
sourcefn close_term(&mut self, state: ScopeState, on_free: &impl OnFreeFn<N>)
fn close_term(&mut self, state: ScopeState, on_free: &impl OnFreeFn<N>)
Close the term using the supplied binders
sourcefn open_term(&mut self, state: ScopeState, on_bound: &impl OnBoundFn<N>)
fn open_term(&mut self, state: ScopeState, on_bound: &impl OnBoundFn<N>)
Open the term using the supplied binders
sourcefn visit_vars(&self, on_var: &mut impl FnMut(&Var<N>))
fn visit_vars(&self, on_var: &mut impl FnMut(&Var<N>))
Visit each variable in the term, calling the
on_var
callback on each
of them in turn Read moresourcefn visit_mut_vars(&mut self, on_var: &mut impl FnMut(&mut Var<N>))
fn visit_mut_vars(&mut self, on_var: &mut impl FnMut(&mut Var<N>))
Visit each variable in the term, calling the
on_var
callback on each
of them in turn Read moresourceimpl<N> PartialEq<Binder<N>> for Var<N>where
N: PartialEq,
impl<N> PartialEq<Binder<N>> for Var<N>where
N: PartialEq,
sourceimpl<N> PartialEq<FreeVar<N>> for Var<N>where
N: PartialEq,
impl<N> PartialEq<FreeVar<N>> for Var<N>where
N: PartialEq,
sourceimpl<N> PartialEq<Var<N>> for Binder<N>where
N: PartialEq,
impl<N> PartialEq<Var<N>> for Binder<N>where
N: PartialEq,
sourceimpl<N> PartialEq<Var<N>> for FreeVar<N>where
N: PartialEq,
impl<N> PartialEq<Var<N>> for FreeVar<N>where
N: PartialEq,
impl<N> Eq for Var<N>where
N: Eq,
impl<N> StructuralPartialEq for Var<N>
Auto Trait Implementations
impl<N> RefUnwindSafe for Var<N>where
N: RefUnwindSafe,
impl<N> Send for Var<N>where
N: Send,
impl<N> Sync for Var<N>where
N: Sync,
impl<N> Unpin for Var<N>where
N: Unpin,
impl<N> UnwindSafe for Var<N>where
N: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more