declare

Macro declare 

Source
macro_rules! declare {
    {
        $(
            $(#[$enum_attribute:meta])*
            $visibility:vis enum $enum_name:ident {
                $(
                    $(#[$member_attribute:meta])*
                    $member:ident$(($($inner_name:ident: $inner_type:ty),+))? $(=> $message:literal)?,
                )+
            }
        )*
    } => { ... };
}
Expand description

Declare error types with automatic error wrapping and trait implementations handled for you.