Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #5

Merged
merged 1 commit into from
Apr 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 1 addition & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,51 +1 @@
## simple-eyre

[![Latest Version](https://img.shields.io/crates/v/simple-eyre.svg)](https://crates.io/crates/simple-eyre)
[![Rust Documentation](https://img.shields.io/badge/api-rustdoc-blue.svg)](https://docs.rs/simple-eyre)

This library provides a custom [`eyre::EyreHandler`] type for usage with [`eyre`] that provides
a minimal error report with no additional context. Essentially the minimal implementation of an
error reporter.

## Setup

Add the following to your toml file:

```toml
[dependencies]
simple-eyre = "0.3"
```

Then install the hook handler before constructing any `eyre::Report` types.

# Example

```rust,should_panic
use simple_eyre::eyre::{eyre, WrapErr, Report};

fn main() -> Result<(), Report> {
simple_eyre::install()?;

let e: Report = eyre!("oh no this program is just bad!");

Err(e).wrap_err("usage example successfully experienced a failure")
}
```

[`eyre::EyreHandler`]: https://docs.rs/eyre/*/eyre/trait.EyreHandler.html
[`eyre`]: https://docs.rs/eyre

#### License

<sup>
Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option.
</sup>

<br>

<sub>
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in this crate by you, as defined in the Apache-2.0 license, shall
be dual licensed as above, without any additional terms or conditions.
</sub>
#### The code has been moved into a monorepo at https://github.com/eyre-rs/eyre/tree/master/simple-eyre
Loading