Crate zerror

source ·
Expand description


zerror provides an error interface for context-aware error-reporting.


Maintenance track. The library is considered stable and will be put into maintenance mode if unchanged for one year.


This library is scoped to provide the Z trait.


  • zerror_core is a separate crate that provides a wrappable struct for implementing Z. This is mildly inconvenient, but was done to separate this library from the zerror_core dependencies.


  • 0.3 -> 0.4: The with_* methods have been consolidated into a single with_info and with_lazy_info implementation. They will be removed in 0.5.


The latest documentation is always available at


  • Create an IoToZ trait that gets implemented for Result<T, $error> where $error is the macro arg.


  • The core type of zerror. Implement this trait, or wrap and proxy ErrorCore, to create rich errors in the long_form. This integrates with the error handling “monad” over Result<T, Z>.