pub struct Runtime { /* private fields */ }
Expand description
EVM runtime.
The runtime wraps an EVM Machine
with support of return data and context.
Implementations§
source§impl Runtime
impl Runtime
sourcepub fn new(
code: Rc<Vec<u8>>,
data: Rc<Vec<u8>>,
context: Context,
stack_limit: usize,
memory_limit: usize
) -> Runtime
pub fn new( code: Rc<Vec<u8>>, data: Rc<Vec<u8>>, context: Context, stack_limit: usize, memory_limit: usize ) -> Runtime
Create a new runtime with given code and data.
sourcepub fn step<H, 'a>(
&'a mut self,
handler: &mut H
) -> Result<(), Capture<ExitReason, Resolve<'a, H>>>where
H: Handler,
pub fn step<H, 'a>(
&'a mut self,
handler: &mut H
) -> Result<(), Capture<ExitReason, Resolve<'a, H>>>where
H: Handler,
Step the runtime.
sourcepub fn run<H, 'a>(
&'a mut self,
handler: &mut H
) -> Capture<ExitReason, Resolve<'a, H>>where
H: Handler,
pub fn run<H, 'a>(
&'a mut self,
handler: &mut H
) -> Capture<ExitReason, Resolve<'a, H>>where
H: Handler,
Loop stepping the runtime until it stops.
pub fn finish_create( &mut self, reason: ExitReason, address: Option<H160>, return_data: Vec<u8> ) -> Result<(), ExitReason>
pub fn finish_call( &mut self, reason: ExitReason, return_data: Vec<u8> ) -> Result<(), ExitReason>
Auto Trait Implementations§
impl RefUnwindSafe for Runtime
impl !Send for Runtime
impl !Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
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