Crate foxerror

Source
Expand description

derive macro for implementing Display and Error on enums

#[derive(Debug, foxerror::FoxError)]
enum Error {
    NamedFields { a: i32, b: i32 },
    #[err(msg = "a custom message")]
    WithMessage(String),
    /// or the first line of the doc comment
    DocWorksToo,
}

Derive Macrosยง

FoxError
the derive macro itself