pub enum Metric<NID>where
NID: NodeId,{
Term(u64),
Vote(Vote<NID>),
LastLogIndex(Option<u64>),
Applied(Option<LogId<NID>>),
AppliedIndex(Option<u64>),
Snapshot(Option<LogId<NID>>),
Purged(Option<LogId<NID>>),
}
Expand description
A metric entry of a Raft node.
This is used to specify which metric to observe.
Variants§
Term(u64)
Vote(Vote<NID>)
LastLogIndex(Option<u64>)
Applied(Option<LogId<NID>>)
AppliedIndex(Option<u64>)
Snapshot(Option<LogId<NID>>)
Purged(Option<LogId<NID>>)
Trait Implementations§
source§impl<NID, N> PartialEq<Metric<NID>> for RaftMetrics<NID, N>
impl<NID, N> PartialEq<Metric<NID>> for RaftMetrics<NID, N>
Metric can be compared with RaftMetrics by comparing the corresponding field of RaftMetrics.
source§impl<NID, N> PartialOrd<Metric<NID>> for RaftMetrics<NID, N>
impl<NID, N> PartialOrd<Metric<NID>> for RaftMetrics<NID, N>
Metric can be compared with RaftMetrics by comparing the corresponding field of RaftMetrics.
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 moreAuto Trait Implementations§
impl<NID> Freeze for Metric<NID>where
NID: Freeze,
impl<NID> RefUnwindSafe for Metric<NID>where
NID: RefUnwindSafe,
impl<NID> Send for Metric<NID>
impl<NID> Sync for Metric<NID>
impl<NID> Unpin for Metric<NID>where
NID: Unpin,
impl<NID> UnwindSafe for Metric<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