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 Forget for RaftMessage
impl Freeze for RaftMessagewhere
*const u8 is !null: Freeze,
PhantomData<RaftEntry>: Freeze,
PhantomData<String>: Freeze,
PhantomData<JournalVersion>: Freeze,
PhantomData<Option<Vec<String>>>: Freeze,
impl Move for RaftMessage
impl RefUnwindSafe for RaftMessage
impl Send for RaftMessagewhere
RawVecInner: Send,
impl Sync for RaftMessagewhere
RawVecInner: Sync,
impl Unpin for RaftMessage
impl UnsafeUnpin for RaftMessagewhere
*const u8 is !null: UnsafeUnpin,
PhantomData<RaftEntry>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<JournalVersion>: UnsafeUnpin,
PhantomData<Option<Vec<String>>>: UnsafeUnpin,
impl UnwindSafe for RaftMessagewhere
RawVecInner: 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