Trait channel_loader::task::TaskHandler [−][src]
pub trait TaskHandler: StaticLoaderExt + Default + Send + Sync { type Key: Key; type Value: Send + Sync + Clone + 'static; type Error: Send + Sync + Clone + 'static; fn handle_task<'async_trait>(
task: Task<PendingAssignment<Self>>
) -> Pin<Box<dyn Future<Output = Task<CompletionReceipt<Self>>> + Send + 'async_trait>>
where
Self: 'async_trait; }
Expand description
A type-state control flow for driving tasks from assignment to completion. As task assignment can be deferred until connection acquisition and likewise loads batched by key, this enables opportunistic batching when connection acquisition becomes a bottleneck and also enables connection yielding as a consequence of work cancellation
Associated Types
Required methods
fn handle_task<'async_trait>(
task: Task<PendingAssignment<Self>>
) -> Pin<Box<dyn Future<Output = Task<CompletionReceipt<Self>>> + Send + 'async_trait>> where
Self: 'async_trait,