Crate zerror

source ·
Expand description

zerror

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

Status

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

Scope

This library is scoped to provide the Z trait.

Warts

  • 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.

Documentation

The latest documentation is always available at docs.rs.

Macros

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

Traits

  • 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>.