pub trait Laned:
Sized
+ Sealed
+ Error
+ Send
+ Sync
+ 'static {
type WithoutTransient: Error + Send + Sync + 'static;
// Required methods
fn lane(&self) -> Lane;
fn narrow_transient(self, attempts: u32) -> Self::WithoutTransient;
fn message(&self) -> String;
// Provided methods
fn is_transient(&self) -> bool { ... }
fn is_fatal(&self) -> bool { ... }
fn is_denied(&self) -> bool { ... }
}Expand description
Required Associated Types§
type WithoutTransient: Error + Send + Sync + 'static
Required Methods§
fn lane(&self) -> Lane
fn narrow_transient(self, attempts: u32) -> Self::WithoutTransient
Sourcefn message(&self) -> String
fn message(&self) -> String
The operator-safe one-line text for this failure — exactly what
record writes to exception.message, for a boundary that must
persist it rather than (or as well as) record it. Transient/
Fatal: the whole source() chain joined with ": ". Denied: its
Display. Rejected: the rejection’s code, never its message
(display discipline — a rejection’s message may embed caller-supplied
input).
Provided Methods§
fn is_transient(&self) -> bool
fn is_fatal(&self) -> bool
fn is_denied(&self) -> bool
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".
Implementors§
Source§impl<F> Laned for Fwhere
F: Failure,
<<F as Failure>::Lanes as LaneProfile>::Transient: NarrowTransient<<<F as Failure>::Lanes as LaneProfile>::Fatal>,
Note the NarrowTransient bound: a profile that admits Transient but
not Fatal is not Laned, so retry cannot be handed one. Retrying an
operation that claims it can never fail permanently is exactly the
contradiction the bound rules out.
impl<F> Laned for Fwhere
F: Failure,
<<F as Failure>::Lanes as LaneProfile>::Transient: NarrowTransient<<<F as Failure>::Lanes as LaneProfile>::Fatal>,
Note the NarrowTransient bound: a profile that admits Transient but
not Fatal is not Laned, so retry cannot be handed one. Retrying an
operation that claims it can never fail permanently is exactly the
contradiction the bound rules out.