CriticalTaskHandler

Type Alias CriticalTaskHandler 

Source
pub type CriticalTaskHandler<Fut> = dyn FnOnce(CancellationToken) -> Fut + Send + 'static;
Expand description

Type alias for a critical task handler function.

The handler receives a CancellationToken and returns a Future that resolves to [Result<()>]. The task should monitor the cancellation token and gracefully shut down when it’s cancelled.