pub enum Val<D: Domain> {
Dom(D),
PrimFun(CurriedFn<D>),
LamClosure(Id, Env<D>),
}
Expand description
a value can either be some domain specific value Dom(D) like an Int, or it can be a primitive function or partially applied primitive function like + or (+ 2) or it can be a lambda function with some captured env like (lam (* $1 $0)) where $1 may have been captured from the surrounding code and this whole object may now be passed around
Variants§
Implementations§
Trait Implementations§
Source§impl<'de, D> Deserialize<'de> for Val<D>where
D: Deserialize<'de> + Domain,
impl<'de, D> Deserialize<'de> for Val<D>where
D: Deserialize<'de> + Domain,
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
impl<D: Eq + Domain> Eq for Val<D>
impl<D: Domain> StructuralPartialEq for Val<D>
Auto Trait Implementations§
impl<D> Freeze for Val<D>where
D: Freeze,
impl<D> RefUnwindSafe for Val<D>where
D: RefUnwindSafe,
impl<D> Send for Val<D>where
D: Send,
impl<D> Sync for Val<D>where
D: Sync,
impl<D> Unpin for Val<D>where
D: Unpin,
impl<D> UnwindSafe for Val<D>where
D: 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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.