pub struct StylusVm { /* private fields */ }Implementations§
Source§impl StylusVm
impl StylusVm
pub fn new() -> Self
Sourcepub fn load_contract(&mut self, bytes: &[u8]) -> Result<()>
pub fn load_contract(&mut self, bytes: &[u8]) -> Result<()>
Load a WASM contract into the VM.
pub fn load_instructions(&mut self, instructions: Vec<Instruction>)
pub fn execute(&mut self, instructions: &[Instruction]) -> VmResult
pub fn stack(&self) -> &[String]
pub fn storage(&self) -> &BTreeMap<String, String>
pub fn trace(&self) -> &[ExecutionEvent]
pub fn current_ptr(&self) -> usize
pub fn is_reverted(&self) -> bool
Auto Trait Implementations§
impl Freeze for StylusVm
impl !RefUnwindSafe for StylusVm
impl Send for StylusVm
impl Sync for StylusVm
impl Unpin for StylusVm
impl UnsafeUnpin for StylusVm
impl !UnwindSafe for StylusVm
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more