pub struct FreeVar<N> {
pub unique_id: UniqueId,
pub pretty_name: Option<N>,
}Expand description
A free variable
Fields§
§unique_id: UniqueIdA generated id
pretty_name: Option<N>programmer-provided name for pretty-printing
Implementations§
Source§impl<N> FreeVar<N>
impl<N> FreeVar<N>
Sourcepub fn fresh(pretty_name: Option<N>) -> FreeVar<N>
pub fn fresh(pretty_name: Option<N>) -> FreeVar<N>
Create a fresh free variable, with an optional name hint for pretty printing
Sourcepub fn fresh_unnamed() -> FreeVar<N>
pub fn fresh_unnamed() -> FreeVar<N>
Create a fresh free variable, with no name hint
Sourcepub fn fresh_named(pretty_name: impl Into<N>) -> FreeVar<N>
pub fn fresh_named(pretty_name: impl Into<N>) -> FreeVar<N>
Create a fresh free variable, with a name hint for pretty printing
Trait Implementations§
Source§impl<N: Clone + PartialEq> BoundTerm<N> for FreeVar<N>
impl<N: Clone + PartialEq> BoundTerm<N> for FreeVar<N>
Source§fn close_term(&mut self, _: ScopeState, _: &impl OnFreeFn<N>)
fn close_term(&mut self, _: ScopeState, _: &impl OnFreeFn<N>)
Close the term using the supplied binders
Source§fn open_term(&mut self, _: ScopeState, _: &impl OnBoundFn<N>)
fn open_term(&mut self, _: ScopeState, _: &impl OnBoundFn<N>)
Open the term using the supplied binders
Source§fn visit_vars(&self, _: &mut impl FnMut(&Var<N>))
fn visit_vars(&self, _: &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, _: &mut impl FnMut(&mut Var<N>))
fn visit_mut_vars(&mut self, _: &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 FreeVar<N>where
N: Eq,
Auto Trait Implementations§
impl<N> Freeze for FreeVar<N>where
N: Freeze,
impl<N> RefUnwindSafe for FreeVar<N>where
N: RefUnwindSafe,
impl<N> Send for FreeVar<N>where
N: Send,
impl<N> Sync for FreeVar<N>where
N: Sync,
impl<N> Unpin for FreeVar<N>where
N: Unpin,
impl<N> UnwindSafe for FreeVar<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