pub enum RaftMessage {
Vote {
pre: bool,
term: u64,
last_index: u64,
last_term: u64,
},
VoteReply {
pre: bool,
term: u64,
granted: bool,
},
Append {
term: u64,
prev_index: u64,
prev_term: u64,
entries: Vec<RaftEntry>,
commit: u64,
},
AppendReply {
term: u64,
success: bool,
index: u64,
},
Propose {
command: RaftCommand,
},
}Variants§
Vote
VoteReply
Append
AppendReply
index is the last matching index on success and a hint otherwise.
Propose
A follower forwards a proposal to the leader it knows.
Fields
§
command: RaftCommandTrait Implementations§
Source§impl Clone for RaftMessage
impl Clone for RaftMessage
Source§impl Debug for RaftMessage
impl Debug for RaftMessage
impl Eq for RaftMessage
Source§impl PartialEq for RaftMessage
impl PartialEq for RaftMessage
impl StructuralPartialEq for RaftMessage
Auto Trait Implementations§
impl Freeze for RaftMessage
impl RefUnwindSafe for RaftMessage
impl Send for RaftMessage
impl Sync for RaftMessage
impl Unpin for RaftMessage
impl UnsafeUnpin for RaftMessage
impl UnwindSafe for RaftMessage
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