Trait AsyncErrorHandlerFunction

Source
pub trait AsyncErrorHandlerFunction:
    Send
    + Sync
    + 'static {
    type Future: Future<Output = ()> + Send;

    // Required method
    fn call(self, error: Arc<String>) -> Self::Future;
}
Expand description

Trait alias for asynchronous error-handling functions used in a recoverable context.

§Arguments

  • Arc<String> - The error message to handle.

§Returns

  • Future - The asynchronous error handling result.

Required Associated Types§

Source

type Future: Future<Output = ()> + Send

Required Methods§

Source

fn call(self, error: Arc<String>) -> Self::Future

Handles an error asynchronously.

  • error: The error message to handle.

Implementors§

Source§

impl<F, Fut> AsyncErrorHandlerFunction for F
where F: FnOnce(Arc<String>) -> Fut + Send + Sync + 'static, Fut: Future<Output = ()> + Send + 'static,

Source§

type Future = Fut