Struct evm_core::Machine [−][src]
Core execution layer for EVM.
Implementations
impl Machine
[src]
pub fn stack(&self) -> &Stack
[src]
Reference of machine stack.
pub fn stack_mut(&mut self) -> &mut Stack
[src]
Mutable reference of machine stack.
pub fn memory(&self) -> &Memory
[src]
Reference of machine memory.
pub fn memory_mut(&mut self) -> &mut Memory
[src]
Mutable reference of machine memory.
pub fn new(
code: Rc<Vec<u8>>,
data: Rc<Vec<u8>>,
stack_limit: usize,
memory_limit: usize
) -> Self
[src]
code: Rc<Vec<u8>>,
data: Rc<Vec<u8>>,
stack_limit: usize,
memory_limit: usize
) -> Self
Create a new machine with given code and data.
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]
Inspect the machine’s next opcode and current stack.
pub fn return_value(&self) -> Vec<u8>
[src]
Copy and get the return value of the machine, if any.
pub fn run(&mut self) -> Capture<ExitReason, Trap>
[src]
Loop stepping the machine, until it stops.
pub fn step(&mut self) -> Result<(), Capture<ExitReason, Trap>>
[src]
Step the machine, executing one opcode. It then returns.
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,