Skip to main content

BoxErrorExt

Trait BoxErrorExt 

pub trait BoxErrorExt: SealedBoxErrorExt {
    // Required method
    fn from_static_str(e: &'static str) -> Self;
}

Required Methods§

fn from_static_str(e: &'static str) -> Self

Create a BoxError from a static str.

Use this instead of "msg".context() or some other method that turns it into a BoxError… Because the std rust library turns this into a String otherwise…

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl BoxErrorExt for Box<dyn Error + Sync + Send>