[−][src]Trait maybe_unwind::FutureMaybeUnwindExt
An extension trait for Future
s that provides an adaptor for capturing
the unwinding panic information.
Provided methods
fn maybe_unwind(self) -> MaybeUnwind<Self> where
Self: UnwindSafe,
Self: UnwindSafe,
Catches unwinding panics while polling the future.
This is a variant of catch_unwind
that also captures
the panic information.
Example
use maybe_unwind::FutureMaybeUnwindExt as _; std::panic::set_hook(Box::new(|info| { maybe_unwind::capture_panic_info(info); })); let res = do_something_async().maybe_unwind().await;