pub struct LogState<C: RaftTypeConfig> {
pub last_purged_log_id: Option<LogId<C::NodeId>>,
pub last_log_id: Option<LogId<C::NodeId>>,
}
Expand description
The state about logs.
Invariance: last_purged_log_id <= last_applied <= last_log_id
Fields§
§last_purged_log_id: Option<LogId<C::NodeId>>
The greatest log id that has been purged after being applied to state machine.
last_log_id: Option<LogId<C::NodeId>>
The log id of the last present entry if there are any entries.
Otherwise the same value as last_purged_log_id
.
Trait Implementations§
source§impl<C: PartialEq + RaftTypeConfig> PartialEq<LogState<C>> for LogState<C>where
C::NodeId: PartialEq,
impl<C: PartialEq + RaftTypeConfig> PartialEq<LogState<C>> for LogState<C>where C::NodeId: PartialEq,
impl<C: Eq + RaftTypeConfig> Eq for LogState<C>where C::NodeId: Eq,
impl<C: RaftTypeConfig> StructuralEq for LogState<C>
impl<C: RaftTypeConfig> StructuralPartialEq for LogState<C>
Auto Trait Implementations§
impl<C> RefUnwindSafe for LogState<C>where <C as RaftTypeConfig>::NodeId: RefUnwindSafe,
impl<C> Send for LogState<C>
impl<C> Sync for LogState<C>
impl<C> Unpin for LogState<C>where <C as RaftTypeConfig>::NodeId: Unpin,
impl<C> UnwindSafe for LogState<C>where <C as RaftTypeConfig>::NodeId: 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.