pub enum ConfigError {
ParseError {
source: BoxedErrorSource,
args: Vec<String>,
},
ElectionTimeout {
min: u64,
max: u64,
},
MaxPayloadIs0,
ElectionTimeoutLTHeartBeat {
election_timeout_min: u64,
heartbeat_interval: u64,
},
HeartbeatMinIntervalTooLarge {
election_timeout_min: u64,
heartbeat_interval: u64,
heartbeat_min_interval: u64,
},
QuorumLossProbeIntervalTooSmall {
election_timeout_max: u64,
probe_interval: u64,
},
InvalidSnapshotPolicy {
invalid: String,
syntax: String,
},
InvalidNumber {
invalid: String,
reason: String,
},
InvalidBackoff(ParseError),
}Expand description
Error variants related to configuration.
Since: 0.10.0: added quorum-loss inactivity validation error
Variants§
ParseError
Failed to parse configuration from command-line arguments.
Since: 0.10.0: source from AnyError to BoxedErrorSource
Fields
source: BoxedErrorSourceThe underlying parse error.
ElectionTimeout
The min election timeout is not smaller than the max election timeout.
MaxPayloadIs0
The max_payload_entries configuration must be greater than 0.
ElectionTimeoutLTHeartBeat
Election timeout must be greater than heartbeat interval.
Fields
HeartbeatMinIntervalTooLarge
Heartbeat suppression must not delay a heartbeat past a follower’s election timeout.
Since: 0.10.0
Fields
QuorumLossProbeIntervalTooSmall
The probe interval must leave time for follower lease expiry and an election.
Since: 0.10.0: added quorum-loss inactivity validation
Fields
InvalidSnapshotPolicy
Invalid snapshot policy string format.
Fields
InvalidNumber
Failed to parse a number from string.
InvalidBackoff(ParseError)
Invalid backoff policy string.
See backoff_series::BackoffSeries::parse for the expected format.
Since: 0.10.0
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
impl Eq for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
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<ParseError> for ConfigError
impl From<ParseError> for ConfigError
Source§fn from(source: BackoffParseError) -> Self
fn from(source: BackoffParseError) -> Self
Source§impl PartialEq for ConfigError
impl PartialEq for ConfigError
impl StructuralPartialEq for ConfigError
Auto Trait Implementations§
impl Freeze for ConfigError
impl RefUnwindSafe for ConfigError
impl Send for ConfigError
impl Sync for ConfigError
impl Unpin for ConfigError
impl UnsafeUnpin for ConfigError
impl UnwindSafe for ConfigError
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
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> ⓘ
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> ⓘ
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 more