mirror of
https://github.com/eyre-rs/eyre.git
synced 2025-09-28 05:21:34 +00:00
document main types
This commit is contained in:
parent
4e85352a1e
commit
6c4194a711
17
README.md
17
README.md
@ -4,10 +4,19 @@ color-eyre
|
||||
A custom context for the [`eyre`] crate for colorful error reports, suggestions,
|
||||
and [`tracing-error`] support.
|
||||
|
||||
This crate is currently pre-release while I try to upstream changes I made to
|
||||
[`color-backtrace`] to support this crate. Until then I cannot publish this to
|
||||
crates.io, the documentation is filled out however so simply run `cargo doc
|
||||
--open` for an explanation of usage.
|
||||
This crate works by defining a `Context` type which implements `EyreContext`
|
||||
and a pair of type aliases for setting this context object as the parameter of
|
||||
`eyre::Report`.
|
||||
|
||||
```rust
|
||||
pub type Report = eyre::Report<Context>;
|
||||
pub type Result<T, E = Report> = core::result::Result<T, E>;
|
||||
```
|
||||
|
||||
**Disclaimer**: This crate is currently pre-release while I try to upstream
|
||||
changes I made to [`color-backtrace`] to support this crate. Until then I
|
||||
cannot publish this to crates.io, the documentation is filled out however so
|
||||
simply run `cargo doc --open` for an explanation of usage.
|
||||
|
||||
## Setup
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
//! This library provides a custom [`eyre::EyreContext`] type for colorful error
|
||||
//! reports with custom help text for the [`eyre`] crate.
|
||||
//!
|
||||
//! **Disclaimer**: This library is currently in pre-release while I work on upstreaming changes I
|
||||
//! made to [`color-backtrace`], until then this depends on unreleased versions on github and so it
|
||||
//! cannot be published to crates.io
|
||||
//!
|
||||
//! # Features
|
||||
//!
|
||||
//! - captures a [`backtrace::Backtrace`] and prints using [`color-backtrace`]
|
||||
@ -68,6 +72,7 @@
|
||||
//! 
|
||||
//!
|
||||
//! [`eyre::EyreContext`]: https://docs.rs/eyre/0.3.8/eyre/trait.EyreContext.html
|
||||
//! [`eyre`]: https://docs.rs/eyre
|
||||
//! [`backtrace::Backtrace`]: https://docs.rs/backtrace/0.3.46/backtrace/struct.Backtrace.html
|
||||
//! [`tracing_error::SpanTrace`]: https://docs.rs/tracing-error/0.1.2/tracing_error/struct.SpanTrace.html
|
||||
//! [`color-backtrace`]: https://docs.rs/color-backtrace
|
||||
|
Loading…
x
Reference in New Issue
Block a user