Skip to main content

error

Attribute Macro error 

Source
#[error]
Expand description

Declare an error domain from an enum whose variants have explicit positive values (the stable codes) and optional named fields (the code’s payload). The macro generates Display (each variant’s #[weaveffi(message = "...")] template, which may name its fields in braces, else the first line of its docs) and std::error::Error, unless written #[weaveffi::error(no_display)].