Trait PanicContext

Source
pub trait PanicContext<E>:
    Sized
    + Into<E>
    + FromPanic
where 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§

Source

fn panic_context<T>( fun: impl FnOnce() -> Result<T, Self> + UnwindSafe, ) -> Result<T, E>

Source

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.

Implementors§

Source§

impl<EI, EO> PanicContext<EO> for EI
where EI: Into<EO> + FromPanic, EO: Error,