pub enum EntryKind {
Normal,
Config,
}Expand description
What a LogEntry carries.
Most entries are Normal application commands. A
Config entry instead carries a cluster configuration —
the voting membership — and drives a membership change; its
command bytes encode the new member set rather than an
application command, so the protocol interprets them and the application does
not apply them.
§Examples
use raft_io::{EntryKind, LogEntry};
assert_eq!(LogEntry::new(1, 1, vec![]).kind, EntryKind::Normal);
assert_eq!(LogEntry::config(1, 2, &[1, 2, 3]).kind, EntryKind::Config);Variants§
Normal
An ordinary application command, applied to the state machine.
Config
A cluster-configuration change. The command bytes encode the new voting membership; the protocol adopts it and never applies it to the state machine.
Trait Implementations§
impl Copy for EntryKind
Source§impl Deserialize for EntryKind
impl Deserialize for EntryKind
impl Eq for EntryKind
Source§impl Serialize for EntryKind
impl Serialize for EntryKind
impl StructuralPartialEq for EntryKind
Auto Trait Implementations§
impl Freeze for EntryKind
impl RefUnwindSafe for EntryKind
impl Send for EntryKind
impl Sync for EntryKind
impl Unpin for EntryKind
impl UnsafeUnpin for EntryKind
impl UnwindSafe for EntryKind
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