pub struct Embed<T>(pub T);
Expand description
Embed a term in a pattern
Tuple Fields
0: T
Trait Implementations
sourceimpl<N, T> BoundPattern<N> for Embed<T>where
N: Clone + PartialEq,
T: BoundTerm<N>,
impl<N, T> BoundPattern<N> for Embed<T>where
N: Clone + PartialEq,
T: BoundTerm<N>,
sourcefn pattern_eq(&self, other: &Embed<T>) -> bool
fn pattern_eq(&self, other: &Embed<T>) -> bool
Alpha equivalence for patterns
sourcefn close_pattern(&mut self, state: ScopeState, on_free: &impl OnFreeFn<N>)
fn close_pattern(&mut self, state: ScopeState, on_free: &impl OnFreeFn<N>)
Close the terms in the pattern using the supplied binders
sourcefn open_pattern(&mut self, state: ScopeState, on_bound: &impl OnBoundFn<N>)
fn open_pattern(&mut self, state: ScopeState, on_bound: &impl OnBoundFn<N>)
Open the terms in the pattern 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 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<T: PartialEq> PartialEq<Embed<T>> for Embed<T>
impl<T: PartialEq> PartialEq<Embed<T>> for Embed<T>
impl<T: Eq> Eq for Embed<T>
impl<T> StructuralEq for Embed<T>
impl<T> StructuralPartialEq for Embed<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for Embed<T>where
T: RefUnwindSafe,
impl<T> Send for Embed<T>where
T: Send,
impl<T> Sync for Embed<T>where
T: Sync,
impl<T> Unpin for Embed<T>where
T: Unpin,
impl<T> UnwindSafe for Embed<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