pub trait BaseHost {
// Required method
fn get_label_and_source_file(
&self,
location: &Location,
) -> (SourceSpan, Option<Arc<SourceFile>>);
// Provided method
fn resolve_event(&self, _event_id: EventId) -> Option<&EventName> { ... }
}Expand description
Defines the host functionality shared by both sync and async execution.
There are three main categories of interactions between the VM and the host:
- getting a library’s MAST forest,
- handling VM events (which can mutate the process’ advice provider).
Required Methods§
Sourcefn get_label_and_source_file(
&self,
location: &Location,
) -> (SourceSpan, Option<Arc<SourceFile>>)
fn get_label_and_source_file( &self, location: &Location, ) -> (SourceSpan, Option<Arc<SourceFile>>)
Returns the SourceSpan and optional SourceFile for the provided location.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".