Struct mv_async_vm::async_vm::AsyncVM
source · [−]pub struct AsyncVM { /* private fields */ }Expand description
Represents an instance of an async VM.
Implementations
sourceimpl AsyncVM
impl AsyncVM
sourcepub fn new<I, A>(
async_lib_addr: AccountAddress,
natives: I,
actors: A
) -> VMResult<Self> where
I: IntoIterator<Item = (AccountAddress, Identifier, Identifier, NativeFunction)>,
A: IntoIterator<Item = ActorMetadata>,
pub fn new<I, A>(
async_lib_addr: AccountAddress,
natives: I,
actors: A
) -> VMResult<Self> where
I: IntoIterator<Item = (AccountAddress, Identifier, Identifier, NativeFunction)>,
A: IntoIterator<Item = ActorMetadata>,
Creates a new VM, registering the given natives and actors.
sourcepub fn new_session<'r, 'l, S: MoveResolver>(
&'l self,
for_actor: AccountAddress,
virtual_time: u128,
move_resolver: &'r mut S
) -> AsyncSession<'r, 'l, S>
pub fn new_session<'r, 'l, S: MoveResolver>(
&'l self,
for_actor: AccountAddress,
virtual_time: u128,
move_resolver: &'r mut S
) -> AsyncSession<'r, 'l, S>
Creates a new session.
sourcepub fn new_session_with_extensions<'r, 'l, S: MoveResolver>(
&'l self,
for_actor: AccountAddress,
virtual_time: u128,
move_resolver: &'r mut S,
ext: NativeContextExtensions<'r>
) -> AsyncSession<'r, 'l, S>
pub fn new_session_with_extensions<'r, 'l, S: MoveResolver>(
&'l self,
for_actor: AccountAddress,
virtual_time: u128,
move_resolver: &'r mut S,
ext: NativeContextExtensions<'r>
) -> AsyncSession<'r, 'l, S>
Creates a new session.
sourcepub fn get_move_vm(&mut self) -> &mut MoveVM
pub fn get_move_vm(&mut self) -> &mut MoveVM
Get the underlying Move VM.
sourcepub fn resolve_message_hash(
&self,
message_hash: u64
) -> Option<&(ModuleId, Identifier)>
pub fn resolve_message_hash(
&self,
message_hash: u64
) -> Option<&(ModuleId, Identifier)>
Resolve the message hash into module and handler function.
sourcepub fn actor_metadata(&self, module_id: &ModuleId) -> Option<&ActorMetadata>
pub fn actor_metadata(&self, module_id: &ModuleId) -> Option<&ActorMetadata>
Get the actor metadata.
Auto Trait Implementations
impl !RefUnwindSafe for AsyncVM
impl Send for AsyncVM
impl Sync for AsyncVM
impl Unpin for AsyncVM
impl UnwindSafe for AsyncVM
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
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
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more