backerror

Attribute Macro backerror 

Source
#[backerror]
Expand description

Helper attribute macro to enhance thiserror::Error, which adds backerror::LocatedError to the error type.

use backerror::backerror;
use thiserror::Error;

#[backerror]
#[derive(Debug, Error)]
pub enum MyError1 {
    #[error("{0}")]
    IoError(#[from] std::io::Error),
}

#[backerror]
#[derive(Debug, Error)]
#[error(transparent)]
pub struct MyError(#[from] std::io::Error);