Struct moniker::Binder [−][src]
pub struct Binder<N>(pub FreeVar<N>);
Methods
impl<N> Binder<N>
[src]
impl<N> Binder<N>
pub fn user<T: Into<N>>(ident: T) -> Binder<N>
[src]
pub fn user<T: Into<N>>(ident: T) -> Binder<N>
Create a variable from a human-readable string
pub fn freshen(self) -> Binder<N>
[src]
pub fn freshen(self) -> Binder<N>
Trait Implementations
impl<N: Debug> Debug for Binder<N>
[src]
impl<N: Debug> Debug for Binder<N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<N: Clone> Clone for Binder<N>
[src]
impl<N: Clone> Clone for Binder<N>
fn clone(&self) -> Binder<N>
[src]
fn clone(&self) -> Binder<N>
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl<N: PartialEq> PartialEq for Binder<N>
[src]
impl<N: PartialEq> PartialEq for Binder<N>
fn eq(&self, other: &Binder<N>) -> bool
[src]
fn eq(&self, other: &Binder<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Binder<N>) -> bool
[src]
fn ne(&self, other: &Binder<N>) -> bool
This method tests for !=
.
impl<N: Eq> Eq for Binder<N>
[src]
impl<N: Eq> Eq for Binder<N>
impl<N: Hash> Hash for Binder<N>
[src]
impl<N: Hash> Hash for Binder<N>
fn hash<__HN: Hasher>(&self, state: &mut __HN)
[src]
fn hash<__HN: Hasher>(&self, state: &mut __HN)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl<N: Display> Display for Binder<N>
[src]
impl<N: Display> Display for Binder<N>
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl<N> PartialEq<FreeVar<N>> for Binder<N> where
N: PartialEq,
[src]
impl<N> PartialEq<FreeVar<N>> for Binder<N> where
N: PartialEq,
fn eq(&self, other: &FreeVar<N>) -> bool
[src]
fn eq(&self, other: &FreeVar<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<N> BoundPattern<N> for Binder<N> where
N: Clone + Eq + Hash,
[src]
impl<N> BoundPattern<N> for Binder<N> where
N: Clone + Eq + Hash,
fn pattern_eq(&self, _: &Binder<N>) -> bool
[src]
fn pattern_eq(&self, _: &Binder<N>) -> bool
Alpha equivalence in a pattern context
fn close_pattern(&mut self, _: ScopeState, _: &[Binder<N>])
[src]
fn close_pattern(&mut self, _: ScopeState, _: &[Binder<N>])
fn open_pattern(&mut self, _: ScopeState, _: &[Binder<N>])
[src]
fn open_pattern(&mut self, _: ScopeState, _: &[Binder<N>])
fn visit_binders(
&self,
on_binder: &mut impl FnMut(&Binder<N>)
)
[src]
fn visit_binders(
&self,
on_binder: &mut impl FnMut(&Binder<N>)
)
fn visit_mut_binders(
&mut self,
on_binder: &mut impl FnMut(&mut Binder<N>)
)
[src]
fn visit_mut_binders(
&mut self,
on_binder: &mut impl FnMut(&mut Binder<N>)
)
fn binders(&self) -> Vec<Binder<N>> where
N: Clone,
[src]
fn binders(&self) -> Vec<Binder<N>> where
N: Clone,
Returns the binders in this pattern
impl<N> PartialEq<Binder<N>> for Var<N> where
N: PartialEq,
[src]
impl<N> PartialEq<Binder<N>> for Var<N> where
N: PartialEq,
fn eq(&self, other: &Binder<N>) -> bool
[src]
fn eq(&self, other: &Binder<N>) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]
fn ne(&self, other: &Rhs) -> bool
This method tests for !=
.
impl<N> PartialEq<Var<N>> for Binder<N> where
N: PartialEq,
[src]
impl<N> PartialEq<Var<N>> for Binder<N> where
N: PartialEq,