n0_error

Macro e

Source
macro_rules! e {
    ($($err:tt)::+) => { ... };
    ($($err:tt)::+ , $source:expr) => { ... };
    ($($err:tt)::+ { $($body:tt)* }) => { ... };
}
Expand description

Constructs an error enum/struct value while automatically filling meta: Meta.

  • e!(MyError::Variant) constructs MyError::Variant { meta: Meta::default() }.
  • e!(MyError::Variant, source) constructs MyError::Variant { source, meta: Meta::default() }.
  • e!(MyError::Variant { field: value, other }) constructs MyError::Variant { field: value, other, meta: Meta::default() }