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<'de, NID: NodeId> Deserialize<'de> for Violation<NID>
impl<'de, NID: NodeId> Deserialize<'de> for Violation<NID>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<NID: NodeId> Error for Violation<NID>
impl<NID: NodeId> Error for Violation<NID>
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 for Violation<NID>
impl<NID: PartialEq + NodeId> PartialEq for Violation<NID>
impl<NID: Eq + NodeId> Eq for Violation<NID>
impl<NID: NodeId> StructuralPartialEq for Violation<NID>
Auto Trait Implementations§
impl<NID> Freeze for Violation<NID>where
NID: Freeze,
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<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