#[non_exhaustive]pub enum NodeErrorKind {
CircuitOpen,
Other,
}Expand description
Typed class of a node’s failure, for callers that react to a kind of failure rather than report it (PRINCIPLES §6 — never recover a class by grepping a message).
Non-exhaustive: new classes are additive, so matching must carry a _ arm.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
CircuitOpen
FaucetError::CircuitOpen — the resilience circuit breaker tripped.
faucet schedule delays its next tick by the policy cooldown rather
than re-firing immediately at a destination that just tripped.
Other
Any other failure. Deliberately distinct from None, which means the
node did not fail at all.
Implementations§
Source§impl NodeErrorKind
impl NodeErrorKind
Sourcepub fn classify(error: &FaucetError) -> Self
pub fn classify(error: &FaucetError) -> Self
Classify a node’s failure while the typed error is still intact.
One table, at the boundary where the error is stringified — the whole point of the field is that no consumer has to re-derive this from prose.
Trait Implementations§
Source§impl Clone for NodeErrorKind
impl Clone for NodeErrorKind
impl Copy for NodeErrorKind
Source§impl Debug for NodeErrorKind
impl Debug for NodeErrorKind
impl Eq for NodeErrorKind
Source§impl PartialEq for NodeErrorKind
impl PartialEq for NodeErrorKind
impl StructuralPartialEq for NodeErrorKind
Auto Trait Implementations§
impl Freeze for NodeErrorKind
impl RefUnwindSafe for NodeErrorKind
impl Send for NodeErrorKind
impl Sync for NodeErrorKind
impl Unpin for NodeErrorKind
impl UnsafeUnpin for NodeErrorKind
impl UnwindSafe for NodeErrorKind
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request