Skip to main content

guard_async

Function guard_async 

Source
pub async fn guard_async<F, R>(handler_name: &'static str, fut: F) -> R
where F: Future<Output = R>, R: Default,
Expand description

Run fut with panic isolation. On panic, log and return the default value of R. Use for notification handlers (return ()) and other places where R: Default directly applies.