pub struct Runtime {
pub blockhash_state: BlockhashState,
pub block: HeaderParams,
pub context_history_hooks: Vec<Box<dyn Fn(&Context)>>,
}
Expand description
A VM runtime. Only available in eval.
Fields
blockhash_state: BlockhashState
The current blockhash commitment states.
block: HeaderParams
Block header.
context_history_hooks: Vec<Box<dyn Fn(&Context)>>
Hooks for context history.
Implementations
sourceimpl Runtime
impl Runtime
sourcepub fn new(block: HeaderParams) -> Self
pub fn new(block: HeaderParams) -> Self
Create a new VM runtime.
sourcepub fn with_states(block: HeaderParams, blockhash_state: BlockhashState) -> Self
pub fn with_states(block: HeaderParams, blockhash_state: BlockhashState) -> Self
Create the runtime with the given blockhash state.
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more