Trait Executor

Source
pub trait Executor: Clone + Send {
    // Required method
    fn execute<R: GlobalStateReader + 'static>(
        &self,
        tracking_copy: TrackingCopy<R>,
        execute_request: ExecuteRequest,
    ) -> Result<ExecuteResult, ExecuteError>;
}
Expand description

Executor trait.

An executor is responsible for executing Wasm contracts. This implies that the executor is able to prepare Wasm instances, execute them, and handle errors that occur during execution.

Trait bounds also implying that the executor has to support interior mutability, as it may need to update its internal state during execution of a single or a chain of multiple contracts.

Required Methods§

Source

fn execute<R: GlobalStateReader + 'static>( &self, tracking_copy: TrackingCopy<R>, execute_request: ExecuteRequest, ) -> Result<ExecuteResult, ExecuteError>

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.

Implementors§