Skip to main content

CommandExecute

Trait CommandExecute 

Source
pub trait CommandExecute {
    // Required method
    async fn execute(
        &self,
        rpc_hook: Option<Arc<dyn RPCHook>>,
    ) -> RocketMQResult<()>;
}
Expand description

A trait that defines the execution behavior for commands.

This trait is designed to be implemented by various command types that require execution logic. The execute method provides the functionality to execute a command with a given RPC hook.

Required Methods§

Source

async fn execute( &self, rpc_hook: Option<Arc<dyn RPCHook>>, ) -> RocketMQResult<()>

Executes the command.

§Parameters
  • rpcHook: An Arc containing a reference to a type that implements the RPCHook trait. This hook is used to customize the behavior of remote procedure calls during command execution.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§