pub trait Rejection:
Error
+ Send
+ Sync
+ 'static {
type Code: RejectionCode;
// Required method
fn code(&self) -> Self::Code;
// Provided method
fn level(&self) -> Level { ... }
}Expand description
A pure, caller-correctable domain outcome. Implemented by hand or via
#[derive(errlanes::Rejection)], which emits Display/Error itself
(defaulting Display to the code) unless #[rejection(error = manual)]
hands that to thiserror or a hand-written impl.
Required Associated Types§
Sourcetype Code: RejectionCode
type Code: RejectionCode
A stable, typed, wire-safe identity for this outcome.
Required Methods§
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".