Struct openraft::raft::AppendEntriesRequest
source · pub struct AppendEntriesRequest<C: RaftTypeConfig> {
pub vote: Vote<C::NodeId>,
pub prev_log_id: Option<LogId<C::NodeId>>,
pub entries: Vec<C::Entry>,
pub leader_commit: Option<LogId<C::NodeId>>,
}
Expand description
An RPC sent by a cluster leader to replicate log entries (§5.3), and as a heartbeat (§5.2).
Fields§
§vote: Vote<C::NodeId>
§prev_log_id: Option<LogId<C::NodeId>>
§entries: Vec<C::Entry>
The new log entries to store.
This may be empty when the leader is sending heartbeats. Entries are batched for efficiency.
leader_commit: Option<LogId<C::NodeId>>
The leader’s committed log id.
Trait Implementations§
source§impl<C: Clone + RaftTypeConfig> Clone for AppendEntriesRequest<C>
impl<C: Clone + RaftTypeConfig> Clone for AppendEntriesRequest<C>
source§fn clone(&self) -> AppendEntriesRequest<C>
fn clone(&self) -> AppendEntriesRequest<C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C: RaftTypeConfig> Debug for AppendEntriesRequest<C>
impl<C: RaftTypeConfig> Debug for AppendEntriesRequest<C>
source§impl<'de, C: RaftTypeConfig> Deserialize<'de> for AppendEntriesRequest<C>
impl<'de, C: RaftTypeConfig> Deserialize<'de> for AppendEntriesRequest<C>
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl<C: RaftTypeConfig> MessageSummary<AppendEntriesRequest<C>> for AppendEntriesRequest<C>
impl<C: RaftTypeConfig> MessageSummary<AppendEntriesRequest<C>> for AppendEntriesRequest<C>
source§impl<C: RaftTypeConfig> Serialize for AppendEntriesRequest<C>
impl<C: RaftTypeConfig> Serialize for AppendEntriesRequest<C>
Auto Trait Implementations§
impl<C> Freeze for AppendEntriesRequest<C>
impl<C> RefUnwindSafe for AppendEntriesRequest<C>
impl<C> Send for AppendEntriesRequest<C>
impl<C> Sync for AppendEntriesRequest<C>
impl<C> Unpin for AppendEntriesRequest<C>
impl<C> UnwindSafe for AppendEntriesRequest<C>
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)