Skip to main content

NeoVM

Struct NeoVM 

Source
pub struct NeoVM {
Show 14 fields pub state: VMState, pub eval_stack: Vec<StackItem>, pub invocation_stack: Vec<ExecutionContext>, pub gas_consumed: u64, pub gas_limit: u64, pub max_stack_depth: usize, pub max_invocation_depth: usize, pub notifications: Vec<StackItem>, pub logs: Vec<String>, pub trace: ExecutionTrace, pub tracing_enabled: bool, pub local_slots: Vec<StackItem>, pub argument_slots: Vec<StackItem>, pub static_slots: Vec<StackItem>,
}

Fields§

§state: VMState§eval_stack: Vec<StackItem>§invocation_stack: Vec<ExecutionContext>§gas_consumed: u64§gas_limit: u64§max_stack_depth: usize§max_invocation_depth: usize§notifications: Vec<StackItem>§logs: Vec<String>§trace: ExecutionTrace§tracing_enabled: bool§local_slots: Vec<StackItem>§argument_slots: Vec<StackItem>§static_slots: Vec<StackItem>

Implementations§

Source§

impl NeoVM

Source

pub fn new(gas_limit: u64) -> Self

Create a new VM with default limits

Source

pub fn with_limits( gas_limit: u64, max_stack_depth: usize, max_invocation_depth: usize, ) -> Self

Create a new VM with custom limits

Source

pub fn run(&mut self)

Run the VM until halt or fault

Source

pub fn enable_tracing(&mut self)

Source

pub fn load_script(&mut self, script: Vec<u8>) -> Result<(), VMError>

Source

pub fn execute_next(&mut self) -> Result<(), VMError>

Auto Trait Implementations§

§

impl Freeze for NeoVM

§

impl RefUnwindSafe for NeoVM

§

impl Send for NeoVM

§

impl Sync for NeoVM

§

impl Unpin for NeoVM

§

impl UnwindSafe for NeoVM

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.