pub enum RaftLogAction<T: Types> {
SaveVote(T::Vote),
Append(T::LogId, T::LogPayload),
Commit(T::LogId),
TruncateAfter(Option<T::LogId>),
PurgeUpto(T::LogId),
}Expand description
Raft log commands stored in the WAL.
Variants§
SaveVote(T::Vote)
Save vote change.
Append(T::LogId, T::LogPayload)
Append new log entry.
Commit(T::LogId)
Save committed log id.
TruncateAfter(Option<T::LogId>)
Truncate log entries after the specified log id.
PurgeUpto(T::LogId)
Purge log entries up to (and including) the specified log id.
Trait Implementations§
Source§impl<T: Clone + Types> Clone for RaftLogAction<T>
impl<T: Clone + Types> Clone for RaftLogAction<T>
Source§fn clone(&self) -> RaftLogAction<T>
fn clone(&self) -> RaftLogAction<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Types> Decode for RaftLogAction<T>
impl<T: Types> Decode for RaftLogAction<T>
Source§impl<T> Display for RaftLogAction<T>
impl<T> Display for RaftLogAction<T>
Source§impl<T: Types> Encode for RaftLogAction<T>
Implements encoding for WALRecord
Each record is encoded as:
impl<T: Types> Encode for RaftLogAction<T>
Implements encoding for WALRecord Each record is encoded as:
- 4 bytes: record type
- variable bytes: record payload
- 4 bytes: checksum
Source§impl<T: PartialEq + Types> PartialEq for RaftLogAction<T>
impl<T: PartialEq + Types> PartialEq for RaftLogAction<T>
Source§fn eq(&self, other: &RaftLogAction<T>) -> bool
fn eq(&self, other: &RaftLogAction<T>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<T: Eq + Types> Eq for RaftLogAction<T>
impl<T: Types> StructuralPartialEq for RaftLogAction<T>
Auto Trait Implementations§
impl<T> Freeze for RaftLogAction<T>
impl<T> RefUnwindSafe for RaftLogAction<T>where
<T as Types>::Vote: RefUnwindSafe,
<T as Types>::LogId: RefUnwindSafe,
<T as Types>::LogPayload: RefUnwindSafe,
impl<T> Send for RaftLogAction<T>
impl<T> Sync for RaftLogAction<T>
impl<T> Unpin for RaftLogAction<T>
impl<T> UnsafeUnpin for RaftLogAction<T>where
<T as Types>::Vote: UnsafeUnpin,
<T as Types>::LogId: UnsafeUnpin,
<T as Types>::LogPayload: UnsafeUnpin,
impl<T> UnwindSafe for RaftLogAction<T>where
<T as Types>::Vote: UnwindSafe,
<T as Types>::LogId: UnwindSafe,
<T as Types>::LogPayload: UnwindSafe,
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