pub struct Vm { /* private fields */ }
Implementations§
Source§impl Vm
impl Vm
pub fn new() -> Self
Sourcepub fn debug_run(
&mut self,
program: Program,
clock_hz: u64,
) -> Result<i64, RuntimeError>
pub fn debug_run( &mut self, program: Program, clock_hz: u64, ) -> Result<i64, RuntimeError>
Runs the specified program but includes debug prints after each instruction.
Also accepts the clock_hz
parameter which specifies the speed of the VM.
pub fn run(&mut self, program: Program) -> Result<i64, RuntimeError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Vm
impl RefUnwindSafe for Vm
impl Send for Vm
impl Sync for Vm
impl Unpin for Vm
impl UnwindSafe for Vm
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