pub trait AsyncHost: BaseHost {
// Required method
fn on_event(
&mut self,
process: &ProcessState<'_>,
event_id: u32,
) -> impl FutureMaybeSend<Result<Vec<AdviceMutation>, EventError>>;
}
Expand description
Analogous to the SyncHost trait, but designed for asynchronous execution contexts.
Required Methods§
Sourcefn on_event(
&mut self,
process: &ProcessState<'_>,
event_id: u32,
) -> impl FutureMaybeSend<Result<Vec<AdviceMutation>, EventError>>
fn on_event( &mut self, process: &ProcessState<'_>, event_id: u32, ) -> impl FutureMaybeSend<Result<Vec<AdviceMutation>, EventError>>
Handles the event emitted from the VM and provides advice mutations to be applied to the advice provider.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.