pub enum Violation<NID: NodeId> {
VoteNotAscending {
curr: Vote<NID>,
to: Vote<NID>,
},
NonIncrementalVote {
curr: Vote<NID>,
to: Vote<NID>,
},
DirtyLog {
higher_index_log_id: LogId<NID>,
lower_index_log_id: LogId<NID>,
},
LogIndexNotFound {
want: u64,
got: Option<u64>,
},
RangeEmpty {
start: Option<u64>,
end: Option<u64>,
},
RangeNotHalfOpen {
start: Bound<u64>,
end: Bound<u64>,
},
LogsEmpty,
StoreLogsEmpty,
LogsNonConsecutive {
prev: Option<LogId<NID>>,
next: LogId<NID>,
},
ApplyNonConsecutive {
prev: Option<LogId<NID>>,
next: LogId<NID>,
},
AppliedWontConflict {
last_applied: Option<LogId<NID>>,
first_conflict_log_id: LogId<NID>,
},
PurgeNonApplied {
last_applied: Option<LogId<NID>>,
purge_upto: LogId<NID>,
},
}
Expand description
Violations a store would return when running defensive check.
Variants§
VoteNotAscending
NonIncrementalVote
DirtyLog
LogIndexNotFound
RangeEmpty
RangeNotHalfOpen
LogsEmpty
StoreLogsEmpty
LogsNonConsecutive
ApplyNonConsecutive
AppliedWontConflict
PurgeNonApplied
Trait Implementations§
source§impl<NID: NodeId> Display for Violation<NID>where
Vote<NID>: Display + Debug,
LogId<NID>: Debug + Display,
Option<LogId<NID>>: Debug,
impl<NID: NodeId> Display for Violation<NID>where Vote<NID>: Display + Debug, LogId<NID>: Debug + Display, Option<LogId<NID>>: Debug,
source§impl<NID: NodeId> Error for Violation<NID>where
Self: Debug + Display,
impl<NID: NodeId> Error for Violation<NID>where Self: Debug + Display,
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<NID: PartialEq + NodeId> PartialEq<Violation<NID>> for Violation<NID>
impl<NID: PartialEq + NodeId> PartialEq<Violation<NID>> for Violation<NID>
impl<NID: Eq + NodeId> Eq for Violation<NID>
impl<NID: NodeId> StructuralEq for Violation<NID>
impl<NID: NodeId> StructuralPartialEq for Violation<NID>
Auto Trait Implementations§
impl<NID> RefUnwindSafe for Violation<NID>where NID: RefUnwindSafe,
impl<NID> Send for Violation<NID>
impl<NID> Sync for Violation<NID>
impl<NID> Unpin for Violation<NID>where NID: Unpin,
impl<NID> UnwindSafe for Violation<NID>where NID: UnwindSafe,
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.