pub trait TaskExt<T, E> {
// Required methods
fn detach_and_log_err(self, cx: &App);
fn detach_and_log_err_with_backtrace(self, cx: &App);
}Expand description
Extension trait for Task<Result<T, E>> that adds detach_and_log_err with an &App context.
This trait is automatically implemented for all Task<Result<T, E>> types.
Required Methods§
Sourcefn detach_and_log_err(self, cx: &App)
fn detach_and_log_err(self, cx: &App)
Run the task to completion in the background and log any errors that occur.
Sourcefn detach_and_log_err_with_backtrace(self, cx: &App)
fn detach_and_log_err_with_backtrace(self, cx: &App)
Like Self::detach_and_log_err, but uses {:?} formatting on failure so anyhow::Error
values emit their full backtrace. Prefer detach_and_log_err unless a backtrace is wanted.