pub trait DispatchApi: Send + Sync {
// Required methods
fn dispatch<'life0, 'async_trait>(
&'life0 self,
task: Task,
) -> Pin<Box<dyn Future<Output = Result<StructuredResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<Task>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn cancel<'life0, 'life1, 'async_trait>(
&'life0 self,
id: &'life1 Uuid,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
The inbound application API (driving side of the hexagon).
Required Methods§
Sourcefn dispatch<'life0, 'async_trait>(
&'life0 self,
task: Task,
) -> Pin<Box<dyn Future<Output = Result<StructuredResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn dispatch<'life0, 'async_trait>(
&'life0 self,
task: Task,
) -> Pin<Box<dyn Future<Output = Result<StructuredResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Dispatch a task end-to-end and return its normalized result.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".