pub enum HeapEntry {
Object(HashMap<String, Value>),
Array(Vec<Value>),
Function {
bytecode: Bytecode,
arg_count: ArgIndex,
local_count: LocalIndex,
closure_vars: HashMap<String, Value>,
},
String(String),
}Variants§
Object(HashMap<String, Value>)
Array(Vec<Value>)
Function
Fields
§
local_count: LocalIndexString(String)
Implementations§
Source§impl HeapEntry
impl HeapEntry
pub fn size(&self) -> usize
pub fn memory_usage(&self) -> usize
pub fn is_object(&self) -> bool
pub fn is_array(&self) -> bool
pub fn is_function(&self) -> bool
pub fn is_string(&self) -> bool
pub fn as_object(&self) -> Option<&HashMap<String, Value>>
pub fn as_object_mut(&mut self) -> Option<&mut HashMap<String, Value>>
pub fn as_array(&self) -> Option<&Vec<Value>>
pub fn as_array_mut(&mut self) -> Option<&mut Vec<Value>>
pub fn as_function( &self, ) -> Option<(&Bytecode, &ArgIndex, &LocalIndex, &HashMap<String, Value>)>
pub fn as_string(&self) -> Option<&String>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HeapEntry
impl RefUnwindSafe for HeapEntry
impl Send for HeapEntry
impl Sync for HeapEntry
impl Unpin for HeapEntry
impl UnwindSafe for HeapEntry
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