pub trait BaseHost {
    // Provided methods
    fn on_debug(
        &mut self,
        process: &mut ProcessState<'_>,
        options: &DebugOptions,
    ) -> Result<(), ExecutionError> { ... }
    fn on_trace(
        &mut self,
        process: &mut ProcessState<'_>,
        trace_id: u32,
    ) -> Result<(), ExecutionError> { ... }
    fn on_assert_failed(
        &mut self,
        _process: &mut ProcessState<'_>,
        _err_code: Felt,
    ) { ... }
}Expand description
Defines the common interface between SyncHost and AsyncHost, by which the VM can interact with the host.
There are three main categories of interactions between the VM and the host:
- getting a library’s MAST forest,
 - handling advice events (which internally mutates the advice provider), and
 - handling debug and trace events.
 
Provided Methods§
Sourcefn on_debug(
    &mut self,
    process: &mut ProcessState<'_>,
    options: &DebugOptions,
) -> Result<(), ExecutionError>
 
fn on_debug( &mut self, process: &mut ProcessState<'_>, options: &DebugOptions, ) -> Result<(), ExecutionError>
Handles the debug request from the VM.
Sourcefn on_trace(
    &mut self,
    process: &mut ProcessState<'_>,
    trace_id: u32,
) -> Result<(), ExecutionError>
 
fn on_trace( &mut self, process: &mut ProcessState<'_>, trace_id: u32, ) -> Result<(), ExecutionError>
Handles the trace emitted from the VM.
Sourcefn on_assert_failed(&mut self, _process: &mut ProcessState<'_>, _err_code: Felt)
 
fn on_assert_failed(&mut self, _process: &mut ProcessState<'_>, _err_code: Felt)
Handles the failure of the assertion instruction.