pub struct LogId {
pub term: Term,
pub index: LogIndex,
}Expand description
A position in the Raft log: the (term, index) pair that uniquely
identifies an entry. Ordering is lexicographic on (term, index), which is
exactly Raft’s log “up-to-date” comparison (§5.4.1), so LogId values can
be compared directly instead of juggling two primitives.
Fields§
§term: TermTerm of the entry at index.
index: LogIndexLog index.
Implementations§
Trait Implementations§
impl Copy for LogId
Source§impl<'de> Deserialize<'de> for LogId
impl<'de> Deserialize<'de> for LogId
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
impl Eq for LogId
Source§impl Ord for LogId
impl Ord for LogId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for LogId
impl PartialOrd for LogId
impl StructuralPartialEq for LogId
Auto Trait Implementations§
impl Freeze for LogId
impl RefUnwindSafe for LogId
impl Send for LogId
impl Sync for LogId
impl Unpin for LogId
impl UnsafeUnpin for LogId
impl UnwindSafe for LogId
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