Crate fatality

source ·
Expand description

Declarative annotations for fatal or jfyi error variants.

Expand #[fatal] annotations on enum variants into two additional enums that can be converted back, or the original split into two. Determination of fatality can also be forwarded to an inner error that implements the trait Fatality.

Stands on the shoulders of thiserror.

Note: At this time crate fatality also has to import thiserror as part of the manifest until is resolved.



  • Determine the fatality of an error.
  • Converts a flat, yet splitable error into a nested Result<Result<_,Jfyi>, Fatal> error type.
  • Allows to split an error into two types - a fatal and a informational enum error type, that can be further consumed.

Attribute Macros§