pub struct Vm<'a, H: Host> { /* private fields */ }Expand description
The virtual machine.
Implementations§
Source§impl<'a, H: Host> Vm<'a, H>
impl<'a, H: Host> Vm<'a, H>
Sourcepub fn new(chunk: &'a Chunk, host: &'a mut H, budget: Budget) -> Self
pub fn new(chunk: &'a Chunk, host: &'a mut H, budget: Budget) -> Self
Create a new VM for executing the given chunk.
Sourcepub fn with_extension_governance(
self,
call_context: CallExecutionContext,
sentinel_gate: Option<&'a mut dyn SentinelPolicyGate>,
) -> Self
pub fn with_extension_governance( self, call_context: CallExecutionContext, sentinel_gate: Option<&'a mut dyn SentinelPolicyGate>, ) -> Self
Configures governed extension execution (CallExecutionContext + optional SentinelPolicyGate).
Sourcepub fn extension_registry_mut(&mut self) -> &mut ExtensionRegistry<'a>
pub fn extension_registry_mut(&mut self) -> &mut ExtensionRegistry<'a>
Mutable reference to the VM’s ExtensionRegistry.
Sourcepub fn last_extension_outcome(&self) -> Option<&DispatchOutcome>
pub fn last_extension_outcome(&self) -> Option<&DispatchOutcome>
Returns the most recent extension DispatchOutcome (receipt + audit NQuin48s), if any.
Auto Trait Implementations§
impl<'a, H> !RefUnwindSafe for Vm<'a, H>
impl<'a, H> !Send for Vm<'a, H>
impl<'a, H> !Sync for Vm<'a, H>
impl<'a, H> !UnwindSafe for Vm<'a, H>
impl<'a, H> Freeze for Vm<'a, H>
impl<'a, H> Unpin for Vm<'a, H>
impl<'a, H> UnsafeUnpin for Vm<'a, H>
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