pub enum Value {
Show 14 variants
True,
False,
Int(IntType),
Float(FloatType),
String(String),
Symbol(Symbol),
List(List),
HashMap(HashMapRc),
NativeFunc(NativeFunc),
NativeClosure(Rc<RefCell<dyn FnMut(Rc<RefCell<Env>>, Vec<Value>) -> Result<Value, RuntimeError>>>),
Lambda(Lambda),
Macro(Lambda),
Foreign(Rc<dyn Any>),
TailCall {
func: Rc<Value>,
args: Vec<Value>,
},
}
Expand description
Value
encompasses all possible Lisp values, including atoms, lists, and
others.
Variants§
True
False
Int(IntType)
Float(FloatType)
String(String)
Symbol(Symbol)
List(List)
HashMap(HashMapRc)
NativeFunc(NativeFunc)
A native Rust function that can be called from lisp code
NativeClosure(Rc<RefCell<dyn FnMut(Rc<RefCell<Env>>, Vec<Value>) -> Result<Value, RuntimeError>>>)
A native Rust closure that can be called from lisp code (the closure can capture things from its Rust environment)
Lambda(Lambda)
A lisp function defined in lisp
Macro(Lambda)
A lisp macro defined in lisp
Foreign(Rc<dyn Any>)
A reference to a foreign value (struct, enum, etc)
TailCall
A tail-call that has yet to be executed. Internal use only!
Implementations§
Trait Implementations§
Source§impl<'a> FromIterator<&'a Value> for List
impl<'a> FromIterator<&'a Value> for List
Source§impl FromIterator<Value> for List
impl FromIterator<Value> for List
Source§impl Ord for Value
impl Ord for Value
Source§impl PartialOrd for Value
impl PartialOrd for Value
impl Eq for Value
Auto Trait Implementations§
impl Freeze for Value
impl !RefUnwindSafe for Value
impl !Send for Value
impl !Sync for Value
impl Unpin for Value
impl !UnwindSafe for Value
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