pub struct InstallSnapshotRequest {
pub term: Term,
pub leader_id: NodeId,
pub last_included_index: LogIndex,
pub last_included_term: Term,
pub offset: u64,
pub data: Vec<u8>,
pub done: bool,
}Expand description
InstallSnapshot RPC request
Invoked by leader to send chunks of a snapshot to a follower
Fields§
§term: TermLeader’s term
leader_id: NodeIdLeader’s ID (so follower can redirect clients)
last_included_index: LogIndexThe snapshot replaces all entries up through and including this index
last_included_term: TermTerm of lastIncludedIndex
offset: u64Byte offset where chunk is positioned in the snapshot file
data: Vec<u8>Raw bytes of the snapshot chunk, starting at offset
done: boolTrue if this is the last chunk
Implementations§
Source§impl InstallSnapshotRequest
impl InstallSnapshotRequest
Trait Implementations§
Source§impl Clone for InstallSnapshotRequest
impl Clone for InstallSnapshotRequest
Source§fn clone(&self) -> InstallSnapshotRequest
fn clone(&self) -> InstallSnapshotRequest
Returns a duplicate 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 Debug for InstallSnapshotRequest
impl Debug for InstallSnapshotRequest
Source§impl<'de> Deserialize<'de> for InstallSnapshotRequest
impl<'de> Deserialize<'de> for InstallSnapshotRequest
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
Auto Trait Implementations§
impl Freeze for InstallSnapshotRequest
impl RefUnwindSafe for InstallSnapshotRequest
impl Send for InstallSnapshotRequest
impl Sync for InstallSnapshotRequest
impl Unpin for InstallSnapshotRequest
impl UnwindSafe for InstallSnapshotRequest
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