pub struct Globals { /* private fields */ }
Implementations§
Source§impl Globals
impl Globals
pub fn new() -> Self
pub fn reserve(&mut self) -> u32
Sourcepub fn set(&mut self, idx: u32, val: Value)
pub fn set(&mut self, idx: u32, val: Value)
Sets a global to val. The value needs have local numbers promoted to the heap before setting it.
pub fn get(&self, idx: u32) -> Value
pub fn mark(&self, heap: &mut Heap)
pub fn get_property(&self, global: u32, prop: Interned) -> Option<Value>
pub fn set_property(&mut self, global: u32, prop: Interned, value: Value)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Globals
impl RefUnwindSafe for Globals
impl Send for Globals
impl Sync for Globals
impl Unpin for Globals
impl UnwindSafe for Globals
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