pub enum Var<N> {
Free(FreeVar<N>),
Bound(BoundVar<N>),
}Expand description
A variable that can either be free or bound
Variants§
Implementations§
Trait Implementations§
Source§impl<N: Clone + PartialEq> BoundTerm<N> for Var<N>
impl<N: Clone + PartialEq> BoundTerm<N> for Var<N>
Source§fn 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
Source§fn 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
Source§fn 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 turnSource§fn 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 turnimpl<N> Eq for Var<N>where
N: Eq,
impl<N> StructuralPartialEq for Var<N>
Auto Trait Implementations§
impl<N> Freeze for Var<N>where
N: Freeze,
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§
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more