ink_env::call

Trait Executor

Source
pub trait Executor<E: Environment> {
    type Error;

    // Required method
    fn exec<Args, Output>(
        &self,
        input: &ExecutionInput<Args>,
    ) -> Result<MessageResult<Output>, Self::Error>
       where Args: Encode,
             Output: Decode;
}
Expand description

Implemented in different environments to perform contract execution.

Required Associated Types§

Source

type Error

The type of the error that can be returned during execution.

Required Methods§

Source

fn exec<Args, Output>( &self, input: &ExecutionInput<Args>, ) -> Result<MessageResult<Output>, Self::Error>
where Args: Encode, Output: Decode,

Perform the contract execution with the given input data, and return the result.

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§