pub enum Value {
Null,
Bool(bool),
Number(f64),
String(String),
Array(Rc<RefCell<Vec<Value>>>),
Object(Rc<RefCell<HashMap<String, Value>>>),
Function {
params: Vec<String>,
body: Vec<Stmt>,
closure: Rc<RefCell<HashMap<String, Value>>>,
},
Builtin(fn(&[Value]) -> Result<Value, String>),
Return(Box<Value>),
}Expand description
Iris Value Types
Variants§
Null
Bool(bool)
Number(f64)
String(String)
Array(Rc<RefCell<Vec<Value>>>)
Object(Rc<RefCell<HashMap<String, Value>>>)
Function
Builtin(fn(&[Value]) -> Result<Value, String>)
Return(Box<Value>)
Implementations§
Trait Implementations§
impl StructuralPartialEq 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 UnsafeUnpin 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