catch_with_context

Function catch_with_context 

Source
pub async fn catch_with_context<O, C, F>(context: C, future: F)
where O: Display + Send + Sync + 'static, C: FnOnce() -> O, F: Future<Output = Result<()>>,
Expand description

Catch an error from an asynchronous function, passing it to the error logger with a context lazily evaluated from a closure.

See anyhow::Context::with_context