pub trait CommandExecutor: Send + Sync {
// Required methods
fn execute<'life0, 'async_trait>(
&'life0 self,
request: CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = CommandEvent> + Send>>, UbiquityError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn cancel<'life0, 'async_trait>(
&'life0 self,
command_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<(), UbiquityError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn status<'life0, 'async_trait>(
&'life0 self,
command_id: Uuid,
) -> Pin<Box<dyn Future<Output = Result<Option<CommandResult>, UbiquityError>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Command executor trait for different implementations
Required Methods§
Sourcefn execute<'life0, 'async_trait>(
&'life0 self,
request: CommandRequest,
) -> Pin<Box<dyn Future<Output = Result<Pin<Box<dyn Stream<Item = CommandEvent> + Send>>, UbiquityError>> + 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<Pin<Box<dyn Stream<Item = CommandEvent> + Send>>, UbiquityError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Execute a command and return a stream of events
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".