pub enum JsObj {
Str(String),
Array(Vec<Value>),
Object(IndexMap<String, Value>),
Func(FuncVal),
Builtin(String),
BoundMethod {
recv: Value,
name: String,
},
Null,
Iter {
items: Vec<Value>,
idx: usize,
},
}Expand description
A heap object.
Variants§
Str(String)
Array(Vec<Value>)
Object(IndexMap<String, Value>)
Func(FuncVal)
Builtin(String)
A first-class reference to a builtin function or namespace
(console.log, Math, parseInt).
BoundMethod
A bound method value (obj.method captured then called): dispatches
through call_method(recv, name, args) when invoked.
Null
The single canonical null.
Iter
A live iterator over a sequence, with a cursor.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for JsObj
impl !Send for JsObj
impl !Sync for JsObj
impl !UnwindSafe for JsObj
impl Freeze for JsObj
impl Unpin for JsObj
impl UnsafeUnpin for JsObj
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