pub trait CommandExecutor: Send + Sync {
// Required methods
fn execute<'life0, 'async_trait>(
&'life0 self,
request: CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<CommandResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<ValidationIssue>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn supports(&self, command_type: &CommandType) -> bool;
fn capabilities(&self) -> ExecutorCapabilities;
fn estimate_resources<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<ResourceEstimate>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Command executor trait
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
request: CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<CommandResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn execute<'life0, 'async_trait>(
&'life0 self,
request: CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<CommandResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a command with the unified pipeline
Sourcefn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<ValidationIssue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn validate<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<Vec<ValidationIssue>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Validate a command request without executing it
Sourcefn supports(&self, command_type: &CommandType) -> bool
fn supports(&self, command_type: &CommandType) -> bool
Check if this executor supports the given command type
Sourcefn capabilities(&self) -> ExecutorCapabilities
fn capabilities(&self) -> ExecutorCapabilities
Get executor capabilities and limitations
Sourcefn estimate_resources<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<ResourceEstimate>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn estimate_resources<'life0, 'life1, 'async_trait>(
&'life0 self,
request: &'life1 CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<ResourceEstimate>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Estimate resource requirements for a command
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
impl CommandExecutor for UnifiedCommandExecutor
Command executor trait