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§
Sourceasync fn execute(
&self,
rpc_hook: Option<Arc<dyn RPCHook>>,
) -> RocketMQResult<()>
async fn execute( &self, rpc_hook: Option<Arc<dyn RPCHook>>, ) -> RocketMQResult<()>
Executes the command.
§Parameters
rpcHook: AnArccontaining a reference to a type that implements theRPCHooktrait. 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".