pub enum GTerm<V: Binder, M> {
Undef,
Var(V::Var),
Abs(Box<(V, GTerm<V, M>)>),
App(Box<(GTerm<V, M>, GTerm<V, M>)>),
Mix(M),
}
Variants§
Implementations§
Source§impl<V: Binder, M> GTerm<V, M>
impl<V: Binder, M> GTerm<V, M>
pub fn to_args<'a>(&'a self, args: &mut Vec<&'a GTerm<V, M>>) -> &'a GTerm<V, M>
pub fn map_vars<X: Binder<Var = X>>( self, f: &mut impl FnMut(V::Var) -> X, ) -> GTerm<V::Wrap<X>, M>
pub fn map_all<X: Binder>( self, f: &mut impl FnMut(V::Var) -> X::Var, g: &mut impl FnMut(V) -> X, ) -> GTerm<X, M>
pub fn map_mix<N>(self, f: &mut impl FnMut(M) -> N) -> GTerm<V, N>
pub fn lower_mix<N>(self, f: &mut impl FnMut(M) -> GTerm<V, N>) -> GTerm<V, N>
pub fn subst( self, f: &mut impl FnMut(&V::Var) -> Option<GTerm<V, M>>, ) -> GTerm<V, M>
Trait Implementations§
Source§impl<'de, V, M> Deserialize<'de> for GTerm<V, M>
impl<'de, V, M> Deserialize<'de> for GTerm<V, M>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<V: Ord + Binder, M: Ord> Ord for GTerm<V, M>
impl<V: Ord + Binder, M: Ord> Ord for GTerm<V, M>
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl<V: PartialOrd + Binder, M: PartialOrd> PartialOrd for GTerm<V, M>where
V::Var: PartialOrd,
impl<V: PartialOrd + Binder, M: PartialOrd> PartialOrd for GTerm<V, M>where
V::Var: PartialOrd,
impl<V: Eq + Binder, M: Eq> Eq for GTerm<V, M>
impl<V: Binder, M> StructuralPartialEq for GTerm<V, M>
Auto Trait Implementations§
impl<V, M> Freeze for GTerm<V, M>
impl<V, M> RefUnwindSafe for GTerm<V, M>
impl<V, M> Send for GTerm<V, M>
impl<V, M> Sync for GTerm<V, M>
impl<V, M> Unpin for GTerm<V, M>
impl<V, M> UnwindSafe for GTerm<V, M>
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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