Struct evm::Machine [−][src]
pub struct Machine { /* fields omitted */ }
Expand description
Core execution layer for EVM.
Implementations
impl Machine
[src]
impl Machine
[src]pub fn memory_mut(&mut self) -> &mut Memory
[src]
pub fn memory_mut(&mut self) -> &mut Memory
[src]Mutable reference of machine memory.
pub fn position(&self) -> &Result<usize, ExitReason>
[src]
pub fn position(&self) -> &Result<usize, ExitReason>
[src]Return a reference of the program counter.
pub fn new(
code: Rc<Vec<u8, Global>>,
data: Rc<Vec<u8, Global>>,
stack_limit: usize,
memory_limit: usize
) -> Machine
[src]
pub fn new(
code: Rc<Vec<u8, Global>>,
data: Rc<Vec<u8, Global>>,
stack_limit: usize,
memory_limit: usize
) -> Machine
[src]Create a new machine with given code and data.
pub fn exit(&mut self, reason: ExitReason)
[src]
pub fn exit(&mut self, reason: ExitReason)
[src]Explict exit of the machine. Further step will return error.
pub fn inspect(&self) -> Option<(Opcode, &Stack)>
[src]
pub fn inspect(&self) -> Option<(Opcode, &Stack)>
[src]Inspect the machine’s next opcode and current stack.
pub fn return_value(&self) -> Vec<u8, Global>
[src]
pub fn return_value(&self) -> Vec<u8, Global>
[src]Copy and get the return value of the machine, if any.
pub fn run(&mut self) -> Capture<ExitReason, Opcode>
[src]
pub fn run(&mut self) -> Capture<ExitReason, Opcode>
[src]Loop stepping the machine, until it stops.
Auto Trait Implementations
impl !RefUnwindSafe for Machine
impl !Send for Machine
impl !Sync for Machine
impl Unpin for Machine
impl UnwindSafe for Machine
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self