Skip to content

Repository files navigation

A context-aware concrete Error type built on core::error::Error

Crates.io Documentation MSRV 1.85 Apache 2.0 licensed Build Status

Overview

exn provides the missing context APIs for core::error::Error.

It organizes errors as a tree, preserving typed context at module boundaries while still supporting type erasure where one concrete error type cannot be named.

Documentation

Read the API documentation for examples and guidance on choosing typed and erased boundaries. See the CHANGELOG for version-specific migration notes.

no_std crates

This crate is no_std compatible, while the alloc crate is still required for heap allocations.

It is worth noting that no_std support is a nice-to-have feature, and can be dropped if it blocks other important features in the future. Before 1.0, once exn APIs settle down, the decision on whether to keep no_std as a promise will be finalized.

Minimum Rust version policy

This crate is built against the latest stable release, and its minimum supported rustc version is 1.85.0.

The policy is that the minimum Rust version required to use this crate can be increased in minor version updates. For example, if version 1.0 requires Rust 1.60.0, then version 1.0.z for all values of z will also require Rust 1.60.0 or newer. However, version 1.y for y > 0 may require a newer minimum version of Rust.

License

This project is licensed under Apache License, Version 2.0.

About

A context-aware concrete Error type built on core::error::Error.

Topics

Resources

Stars

269 stars

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages

Generated from fast/template