#[derive(Error)]
{
// Attributes available to this derive:
#[error]
#[source]
#[from]
}
Expand description
Derives core::fmt::Display + std::error::Error for an error enum from a
per-variant #[error("...")] format literal — a thiserror-lite.
Every variant needs exactly one #[error("literal {field}")]. A field
annotated #[source] becomes Error::source(); #[from] additionally
generates impl From. Enums only; see crates/macros/src/error.rs for the
full contract (byte-identical rendering, explicit source wiring).