thedes_tui_core/panic/
restore.rs

1use std::fmt;
2
3pub mod native;
4pub mod null;
5
6#[cfg(feature = "testing")]
7pub mod mock;
8
9pub trait PanicRestoreGuard: fmt::Debug + Send + Sync {
10    fn cancel(self: Box<Self>);
11}
12
13impl<T> PanicRestoreGuard for Box<T>
14where
15    T: PanicRestoreGuard + ?Sized,
16{
17    fn cancel(self: Box<Self>) {
18        T::cancel(*self);
19    }
20}