#![feature(
specialization,
backtrace,
debug_non_exhaustive,
external_doc,
try_trait,
)]
#![warn(
clippy::all,
clippy::restriction,
clippy::pedantic,
clippy::nursery,
clippy::cargo,
)]
#![allow(
clippy::implicit_return, // We prefer to use implicit returns where possible
clippy::items_after_statements, // Sometimes we only add things from where they are first used, even if they are available in the whole scope
clippy::shadow_reuse, // We shadow values when accepting generics `file: impl AsRef<U>` and `let file = file.as_ref()`, for example
clippy::multiple_inherent_impl, // We separate `impl`s where possible based on their purpose
clippy::let_underscore_must_use, // We'll only use `let _ = ...` if we really want to ignore the result
clippy::module_name_repetitions, // Sometimes we'll have modules such as `Error` and `XYZError` inside of it.
clippy::wildcard_imports, // We only use wildcards for example, when doing `super::*`, when separating implementations into modules.
clippy::missing_inline_in_public_items, // Debated if this does anything
clippy::needless_doctest_main, // We often need it when declaring 2 functions.
)]
pub mod maybe_backtrace;
pub mod result_ext;
pub use maybe_backtrace::MaybeBacktrace;
pub use result_ext::ResultExt;
#[derive(PartialEq, Eq, Hash, Default)]
pub struct StringError<E: ?Sized, B: MaybeBacktrace = ()> {
msg: String,
bt: B,
err: E,
}
mod constructor;
mod getter;
mod debug;
mod display;
mod error;
#[doc(include = "../README.md")]
type _ReadmeDocTests = ();