pub enum LogEntry {
Term(Term),
ClusterConfig(ClusterConfig),
Command,
}Expand description
Log entry.
Each log entry within a cluster is uniquely identified by a LogPosition.
Variants§
Term(Term)
A log entry to indicate the start of a new term with a new leader.
ClusterConfig(ClusterConfig)
A log entry for a new cluster configuration.
Command
A log entry for a user-defined command.
§Note
This crate does not handle the content of user-defined commands.
Therefore, this variant is represented as a unit.
It is the user’s responsibility to manage the mapping from each LogEntry::Command to
an actual command data.
Trait Implementations§
Source§impl Extend<LogEntry> for LogEntries
impl Extend<LogEntry> for LogEntries
Source§fn extend<T: IntoIterator<Item = LogEntry>>(&mut self, iter: T)
fn extend<T: IntoIterator<Item = LogEntry>>(&mut self, iter: T)
Extends a collection with the contents of an iterator. Read more
Source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
🔬This is a nightly-only experimental API. (
extend_one)Extends a collection with exactly one element.
Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
🔬This is a nightly-only experimental API. (
extend_one)Reserves capacity in a collection for the given number of additional elements. Read more
impl Eq for LogEntry
impl StructuralPartialEq for LogEntry
Auto Trait Implementations§
impl Freeze for LogEntry
impl RefUnwindSafe for LogEntry
impl Send for LogEntry
impl Sync for LogEntry
impl Unpin for LogEntry
impl UnwindSafe for LogEntry
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