pub trait PanicContext<E>:
Sized
+ Into<E>
+ FromPanicwhere
E: Error,{
// Provided methods
fn panic_context<T>(
fun: impl FnOnce() -> Result<T, Self> + UnwindSafe,
) -> Result<T, E> { ... }
fn panic_context_value<T>(
fun: impl FnOnce() -> T + UnwindSafe,
) -> Result<T, E> { ... }
}
Provided Methods§
fn panic_context<T>( fun: impl FnOnce() -> Result<T, Self> + UnwindSafe, ) -> Result<T, E>
fn panic_context_value<T>(fun: impl FnOnce() -> T + UnwindSafe) -> Result<T, E>
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.