Trait openraft::log_id::LogIndexOptionExt
source · pub trait LogIndexOptionExt {
// Required methods
fn next_index(&self) -> u64;
fn prev_index(&self) -> Self;
fn add(&self, v: u64) -> Self;
}
Expand description
This helper trait extracts information from an Option<LogIndex>
.
In openraft, LogIndex
is a u64
.
Required Methods§
sourcefn next_index(&self) -> u64
fn next_index(&self) -> u64
Return the next log index.
If self is None
, it returns 0.
sourcefn prev_index(&self) -> Self
fn prev_index(&self) -> Self
Return the previous log index.
If self is None
, it panics.
Object Safety§
This trait is not object safe.