pub struct LogPosition {
pub term: Term,
pub index: LogIndex,
}Expand description
Log position (Term and LogIndex).
A LogPosition uniquely identifies a LogEntry stored within a cluster.
Fields§
§term: TermTerm of the log entry.
index: LogIndexIndex of the log entry.
Implementations§
Source§impl LogPosition
impl LogPosition
Sourcepub const ZERO: Self
pub const ZERO: Self
The initial log position (Term::ZERO and LogIndex::ZERO).
Sourcepub const fn is_invalid(self) -> bool
pub const fn is_invalid(self) -> bool
Returns true if this position is equal to LogPosition::INVALID.
Trait Implementations§
Source§impl Clone for LogPosition
impl Clone for LogPosition
Source§fn clone(&self) -> LogPosition
fn clone(&self) -> LogPosition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for LogPosition
impl Debug for LogPosition
Source§impl Hash for LogPosition
impl Hash for LogPosition
Source§impl Ord for LogPosition
impl Ord for LogPosition
Source§fn cmp(&self, other: &LogPosition) -> Ordering
fn cmp(&self, other: &LogPosition) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for LogPosition
impl PartialEq for LogPosition
Source§impl PartialOrd for LogPosition
impl PartialOrd for LogPosition
impl Copy for LogPosition
impl Eq for LogPosition
impl StructuralPartialEq for LogPosition
Auto Trait Implementations§
impl Freeze for LogPosition
impl RefUnwindSafe for LogPosition
impl Send for LogPosition
impl Sync for LogPosition
impl Unpin for LogPosition
impl UnwindSafe for LogPosition
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