pub struct LogId<NID: NodeId> {
pub leader_id: CommittedLeaderId<NID>,
pub index: u64,
}
Expand description
The identity of a raft log. A term, node_id and an index identifies an log globally.
Fields§
§leader_id: CommittedLeaderId<NID>
§index: u64
Implementations§
source§impl<NID: NodeId> LogId<NID>
impl<NID: NodeId> LogId<NID>
pub fn new(leader_id: CommittedLeaderId<NID>, index: u64) -> Self
pub fn committed_leader_id(&self) -> &CommittedLeaderId<NID>
Trait Implementations§
source§impl<NID: Ord + NodeId> Ord for LogId<NID>
impl<NID: Ord + NodeId> Ord for LogId<NID>
1.21.0 · 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
source§impl<NID: PartialEq + NodeId> PartialEq<LogId<NID>> for LogId<NID>
impl<NID: PartialEq + NodeId> PartialEq<LogId<NID>> for LogId<NID>
source§impl<NID: PartialOrd + NodeId> PartialOrd<LogId<NID>> for LogId<NID>
impl<NID: PartialOrd + NodeId> PartialOrd<LogId<NID>> for LogId<NID>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<NID: Copy + NodeId> Copy for LogId<NID>
impl<NID: Eq + NodeId> Eq for LogId<NID>
impl<NID: NodeId> StructuralEq for LogId<NID>
impl<NID: NodeId> StructuralPartialEq for LogId<NID>
Auto Trait Implementations§
impl<NID> RefUnwindSafe for LogId<NID>where NID: RefUnwindSafe,
impl<NID> Send for LogId<NID>
impl<NID> Sync for LogId<NID>
impl<NID> Unpin for LogId<NID>where NID: Unpin,
impl<NID> UnwindSafe for LogId<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.