Lines Matching +full:rust +full:- +full:src
4 [<img alt="github" src="https://img.shields.io/badge/github-dtolnay/anyhow-8da0cb?style=for-the-bad…
5 [<img alt="crates.io" src="https://img.shields.io/crates/v/anyhow.svg?style=for-the-badge&color=fc8…
6 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-anyhow-66c2a5?style=for-the-badge&lab…
7 [<img alt="build status" src="https://img.shields.io/github/workflow/status/dtolnay/anyhow/CI/maste…
10 for easy idiomatic error handling in Rust applications.
25 - Use `Result<T, anyhow::Error>`, or equivalently `anyhow::Result<T>`, as the
31 ```rust
34 fn get_cluster_info() -> Result<ClusterMap> {
41 - Attach context to help the person troubleshooting the error understand where
42 things went wrong. A low-level error like "No such file or directory" can be
46 ```rust
49 fn main() -> Result<()> {
66 - Downcasting is supported and can be by value, by shared reference, or by
69 ```rust
78 - If using the nightly channel, a backtrace is captured and printed with the
83 - If you want panics and errors to both have backtraces, set
85 - If you want only errors to have backtraces, set `RUST_LIB_BACKTRACE=1`;
86 - If you want only panics to have backtraces, set `RUST_BACKTRACE=1` and
89 The tracking issue for this feature is [rust-lang/rust#53487].
91 [`std::backtrace`]: https://doc.rust-lang.org/std/backtrace/index.html#environment-variables
92 [rust-lang/rust#53487]: https://github.com/rust-lang/rust/issues/53487
94 - Anyhow works with any error type that has an impl of `std::error::Error`,
99 ```rust
114 - One-off error messages can be constructed using the `anyhow!` macro, which
117 ```rust
123 ```rust
129 ## No-std support
137 anyhow = { version = "1.0", default-features = false }
140 Since the `?`-based error conversions would normally rely on the
142 require an explicit `.map_err(Error::msg)` when working with a non-Anyhow error
154 [RFC 2504]: https://github.com/rust-lang/rfcs/blob/master/text/2504-fix-error.md
172 Licensed under either of <a href="LICENSE-APACHE">Apache License, Version
173 2.0</a> or <a href="LICENSE-MIT">MIT license</a> at your option.
180 for inclusion in this crate by you, as defined in the Apache-2.0 license, shall