pub trait Failure:
Sized
+ Error
+ Send
+ Sync
+ 'static {
type Rejection: Rejection;
type Lanes: LaneProfile;
// Required methods
fn into_fail(self) -> Fail<Self::Rejection, Self::Lanes>;
fn from_fail(f: Fail<Self::Rejection, Self::Lanes>) -> Self;
fn as_fail(&self) -> &Fail<Self::Rejection, Self::Lanes>;
// Provided methods
fn lane(&self) -> Lane { ... }
fn is_transient(&self) -> bool { ... }
}Expand description
Implemented by per-crate carrier newtypes, typically via
#[derive(errlanes::Failure)]. Generic machinery (retry, boundary
recorders) is written against this, not against Fail<D, L> directly.
Required Associated Types§
Required Methods§
fn into_fail(self) -> Fail<Self::Rejection, Self::Lanes>
fn from_fail(f: Fail<Self::Rejection, Self::Lanes>) -> Self
fn as_fail(&self) -> &Fail<Self::Rejection, Self::Lanes>
Provided Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".