pub enum LeaderElectionError {
ElectionDisabled,
ProcessNotFound(String),
NotInitialized,
InvalidState(String),
Fdb(FdbError),
PackError(PackError),
UnregisteredCandidate,
}Expand description
Leader election specific errors
Represents all possible error conditions that can occur during leader election operations.
Variants§
ElectionDisabled
Election is currently disabled
Returned when attempting election operations while the election system is administratively disabled
ProcessNotFound(String)
Process not found
The specified process UUID doesn’t exist in the election registry
NotInitialized
Global configuration not initialized
The election system hasn’t been initialized with initialize()
InvalidState(String)
Invalid state
The election system is in an inconsistent or unexpected state
Fdb(FdbError)
Database error
An underlying FoundationDB error occurred
PackError(PackError)
Serialization error
Failed to pack/unpack data using the tuple layer
UnregisteredCandidate
Candidate not registered
The process attempted to claim leadership without being registered as a candidate
Trait Implementations§
Source§impl Debug for LeaderElectionError
impl Debug for LeaderElectionError
Source§impl Display for LeaderElectionError
impl Display for LeaderElectionError
Source§impl Error for LeaderElectionError
impl Error for LeaderElectionError
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()
Source§impl From<FdbError> for LeaderElectionError
impl From<FdbError> for LeaderElectionError
Source§impl From<LeaderElectionError> for FdbBindingError
Available on crate feature recipes-leader-election only.
impl From<LeaderElectionError> for FdbBindingError
recipes-leader-election only.