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)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: 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
Available on crate feature
recipes-leader-election only.Source§fn from(error: LeaderElectionError) -> Self
fn from(error: LeaderElectionError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for LeaderElectionError
impl !RefUnwindSafe for LeaderElectionError
impl Send for LeaderElectionError
impl Sync for LeaderElectionError
impl Unpin for LeaderElectionError
impl !UnwindSafe for LeaderElectionError
Blanket Implementations§
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