pub struct VariableManagerImpl { /* private fields */ }Expand description
Concrete implementation of variable management for the VM
Provides array-based storage for local and global variables with indexed access and modification capabilities.
Implementations§
Source§impl VariableManagerImpl
impl VariableManagerImpl
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new variable manager with empty variable storage
Initializes both local and global variable storage with
32 slots each, all set to Value::Undefined.
pub fn locals(&self) -> &[Value]
pub fn locals_mut(&mut self) -> &mut [Value]
pub fn globals(&self) -> &[Value]
pub fn globals_mut(&mut self) -> &mut [Value]
Trait Implementations§
Source§impl VariableManager for VariableManagerImpl
impl VariableManager for VariableManagerImpl
Source§fn get_local_mut(&mut self, idx: usize) -> Option<&mut Value>
fn get_local_mut(&mut self, idx: usize) -> Option<&mut Value>
Gets a mutable reference to a local variable by index Read more
Source§fn get_global_mut(&mut self, idx: usize) -> Option<&mut Value>
fn get_global_mut(&mut self, idx: usize) -> Option<&mut Value>
Gets a mutable reference to a global variable by index Read more
Auto Trait Implementations§
impl Freeze for VariableManagerImpl
impl RefUnwindSafe for VariableManagerImpl
impl Send for VariableManagerImpl
impl Sync for VariableManagerImpl
impl Unpin for VariableManagerImpl
impl UnwindSafe for VariableManagerImpl
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