bias_miette/lib.rs
1#![deny(missing_docs, missing_debug_implementations, nonstandard_style)]
2#![warn(unreachable_pub, rust_2018_idioms)]
3//! You run miette? You run her code like the software? Oh. Oh! Error code for
4//! coder! Error code for One Thousand Lines!
5//!
6//! ## About
7//!
8//! `miette` is a diagnostic library for Rust. It includes a series of
9//! traits/protocols that allow you to hook into its error reporting facilities,
10//! and even write your own error reports! It lets you define error types that
11//! can print out like this (or in any format you like!):
12//!
13//! <img src="https://raw.githubusercontent.com/zkat/miette/main/images/serde_json.png" alt="Hi! miette also includes a screen-reader-oriented diagnostic printer that's enabled in various situations, such as when you use NO_COLOR or CLICOLOR settings, or on CI. This behavior is also fully configurable and customizable. For example, this is what this particular diagnostic will look like when the narrated printer is enabled:
14//! ## Acknowledgements
15//!
16//! `miette` was not developed in a void. It owes enormous credit to various
17//! other projects and their authors:
18//!
19//! - [`anyhow`](http://crates.io/crates/anyhow) and [`color-eyre`](https://crates.io/crates/color-eyre):
20//! these two enormously influential error handling libraries have pushed
21//! forward the experience of application-level error handling and error
22//! reporting. `miette`'s `Report` type is an attempt at a very very rough
23//! version of their `Report` types.
24//! - [`thiserror`](https://crates.io/crates/thiserror) for setting the standard
25//! for library-level error definitions, and for being the inspiration behind
26//! `miette`'s derive macro.
27//! - `rustc` and [@estebank](https://github.com/estebank) for their
28//! state-of-the-art work in compiler diagnostics.
29//! - [`ariadne`](https://crates.io/crates/ariadne) for pushing forward how
30//! _pretty_ these diagnostics can really look!
31//!
32//! ## License
33//!
34//! `miette` is released to the Rust community under the [Apache license
35//! 2.0](./LICENSE).
36//!
37//! It also includes code taken from [`eyre`](https://github.com/yaahc/eyre),
38//! and some from [`thiserror`](https://github.com/dtolnay/thiserror), also
39//! under the Apache License. Some code is taken from
40//! [`ariadne`](https://github.com/zesterer/ariadne), which is MIT licensed.
41
42pub use error::*;
43pub use handlers::*;
44pub use miette_diagnostic::*;
45pub use named_source::*;
46pub use protocol::*;
47
48mod error;
49mod handlers;
50mod miette_diagnostic;
51mod named_source;
52mod protocol;
53mod source_impls;