Trait openraft::log_id::LogIdOptionExt

source ·
pub trait LogIdOptionExt {
    // Required methods
    fn index(&self) -> Option<u64>;
    fn next_index(&self) -> u64;
}
Expand description

This helper trait extracts information from an Option<LogId>.

Required Methods§

source

fn index(&self) -> Option<u64>

Returns the log index if it is not a None.

source

fn next_index(&self) -> u64

Returns the next log index.

If self is None, it returns 0.

Implementations on Foreign Types§

source§

impl<NID: NodeId> LogIdOptionExt for Option<&LogId<NID>>

source§

fn index(&self) -> Option<u64>

source§

fn next_index(&self) -> u64

source§

impl<NID: NodeId> LogIdOptionExt for Option<LogId<NID>>

source§

fn index(&self) -> Option<u64>

source§

fn next_index(&self) -> u64

Implementors§