pub enum SwimError {
UnknownMember {
node_id: NodeId,
},
StaleIncarnation {
node_id: NodeId,
received: Incarnation,
local: Incarnation,
},
SelfSuspected {
incarnation: Incarnation,
},
InvalidTransition {
from: MemberState,
to: MemberState,
},
InvalidConfig {
field: &'static str,
reason: &'static str,
},
Encode {
detail: String,
},
Decode {
detail: String,
},
TransportClosed,
ProbeInflightOverflow,
}Expand description
Errors produced by the SWIM failure detector and membership layer.
Variants§
UnknownMember
A message or update referenced a node id not present in the membership list. This is non-fatal — the detector will request a full sync from the sender.
StaleIncarnation
Received update carries an incarnation strictly older than the locally recorded value, so the update is refuted.
SelfSuspected
Received a Suspect update targeting the local node. The failure
detector must bump its own incarnation and broadcast an Alive
refutation. Callers treat this as a signal, not a fatal error.
Fields
incarnation: IncarnationInvalidTransition
A state transition violated the SWIM state machine (e.g. attempting
to move a Left member back to Alive). Always a bug.
InvalidConfig
Configuration validation failed. Returned by super::SwimConfig::validate.
Encode
zerompk failed to serialize a SwimMessage. In practice this is
infallible for the current message schema — the variant exists so
future additions to the wire format cannot silently panic.
Decode
zerompk failed to parse incoming bytes as a SwimMessage. Common
causes: truncated datagram, version skew, random UDP noise.
TransportClosed
Transport backend has been closed; no further I/O is possible.
Returned by super::detector::Transport::recv on shutdown.
ProbeInflightOverflow
The in-flight probe map is full. Should never happen in practice — the detector caps concurrent probes at a few tens — but the error exists so a runaway bug cannot corrupt the detector state.
Trait Implementations§
Source§impl Error for SwimError
impl Error for SwimError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for SwimError
impl RefUnwindSafe for SwimError
impl Send for SwimError
impl Sync for SwimError
impl Unpin for SwimError
impl UnsafeUnpin for SwimError
impl UnwindSafe for SwimError
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.