Struct openraft::raft::InstallSnapshotRequest
source · pub struct InstallSnapshotRequest<C: RaftTypeConfig> {
pub vote: Vote<C::NodeId>,
pub meta: SnapshotMeta<C::NodeId, C::Node>,
pub offset: u64,
pub data: Vec<u8>,
pub done: bool,
}
Expand description
An RPC sent by the Raft leader to send chunks of a snapshot to a follower (§7).
Fields§
§vote: Vote<C::NodeId>
§meta: SnapshotMeta<C::NodeId, C::Node>
Metadata of a snapshot: snapshot_id, last_log_ed membership etc.
offset: u64
The byte offset where this chunk of data is positioned in the snapshot file.
data: Vec<u8>
The raw bytes of the snapshot chunk, starting at offset
.
done: bool
Will be true
if this is the last chunk in the snapshot.
Trait Implementations§
source§impl<C: Clone + RaftTypeConfig> Clone for InstallSnapshotRequest<C>where
C::NodeId: Clone,
C::Node: Clone,
impl<C: Clone + RaftTypeConfig> Clone for InstallSnapshotRequest<C>where C::NodeId: Clone, C::Node: Clone,
source§fn clone(&self) -> InstallSnapshotRequest<C>
fn clone(&self) -> InstallSnapshotRequest<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 more