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 for LogState<C>
impl<C: PartialEq + RaftTypeConfig> PartialEq for LogState<C>
impl<C: Eq + RaftTypeConfig> Eq for LogState<C>
impl<C: RaftTypeConfig> StructuralPartialEq for LogState<C>
Auto Trait Implementations§
impl<C> Freeze for LogState<C>
impl<C> RefUnwindSafe for LogState<C>
impl<C> Send for LogState<C>
impl<C> Sync for LogState<C>
impl<C> Unpin for LogState<C>
impl<C> UnwindSafe for LogState<C>
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