pub struct Ignore<T>(pub T);
Expand description
Data that does not participate in name binding
This can be useful for adding information like source code locations to syntax trees.
Tuple Fields
0: T
Trait Implementations
sourceimpl<N, T> BoundPattern<N> for Ignore<T>where
N: Clone + PartialEq,
impl<N, T> BoundPattern<N> for Ignore<T>where
N: Clone + PartialEq,
sourcefn pattern_eq(&self, _: &Ignore<T>) -> bool
fn pattern_eq(&self, _: &Ignore<T>) -> bool
Alpha equivalence for patterns
sourcefn close_pattern(&mut self, _: ScopeState, _: &impl OnFreeFn<N>)
fn close_pattern(&mut self, _: ScopeState, _: &impl OnFreeFn<N>)
Close the terms in the pattern using the supplied binders
sourcefn open_pattern(&mut self, _: ScopeState, _: &impl OnBoundFn<N>)
fn open_pattern(&mut self, _: ScopeState, _: &impl OnBoundFn<N>)
Open the terms in the pattern using the supplied binders
sourcefn 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 turn Read moresourcefn 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 turn Read moresourcefn visit_binders(&self, _: &mut impl FnMut(&Binder<N>))
fn visit_binders(&self, _: &mut impl FnMut(&Binder<N>))
Visit each of the binders in the term, calling the
on_binder
callback
on each of them in turn Read moresourcefn visit_mut_binders(&mut self, _: &mut impl FnMut(&mut Binder<N>))
fn visit_mut_binders(&mut self, _: &mut impl FnMut(&mut Binder<N>))
Visit each of the binders in the term, calling the
on_binder
callback
on each of them in turn Read moresourceimpl<N, T> BoundTerm<N> for Ignore<T>where
N: Clone + PartialEq,
impl<N, T> BoundTerm<N> for Ignore<T>where
N: Clone + PartialEq,
sourcefn close_term(&mut self, _: ScopeState, _: &impl OnFreeFn<N>)
fn close_term(&mut self, _: ScopeState, _: &impl OnFreeFn<N>)
Close the term using the supplied binders
sourcefn open_term(&mut self, _: ScopeState, _: &impl OnBoundFn<N>)
fn open_term(&mut self, _: ScopeState, _: &impl OnBoundFn<N>)
Open the term using the supplied binders
sourcefn 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 turn Read moresourcefn 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 turn Read moresourceimpl<T: PartialEq> PartialEq<Ignore<T>> for Ignore<T>
impl<T: PartialEq> PartialEq<Ignore<T>> for Ignore<T>
impl<T: Copy> Copy for Ignore<T>
impl<T: Eq> Eq for Ignore<T>
impl<T> StructuralEq for Ignore<T>
impl<T> StructuralPartialEq for Ignore<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Ignore<T>where
T: RefUnwindSafe,
impl<T> Send for Ignore<T>where
T: Send,
impl<T> Sync for Ignore<T>where
T: Sync,
impl<T> Unpin for Ignore<T>where
T: Unpin,
impl<T> UnwindSafe for Ignore<T>where
T: 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