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>
impl<C: Clone + RaftTypeConfig> Clone for InstallSnapshotRequest<C>
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 moresource§impl<C: Debug + RaftTypeConfig> Debug for InstallSnapshotRequest<C>
impl<C: Debug + RaftTypeConfig> Debug for InstallSnapshotRequest<C>
source§impl<'de, C: RaftTypeConfig> Deserialize<'de> for InstallSnapshotRequest<C>
impl<'de, C: RaftTypeConfig> Deserialize<'de> for InstallSnapshotRequest<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> Display for InstallSnapshotRequest<C>
impl<C: RaftTypeConfig> Display for InstallSnapshotRequest<C>
source§impl<C: RaftTypeConfig> MessageSummary<InstallSnapshotRequest<C>> for InstallSnapshotRequest<C>
impl<C: RaftTypeConfig> MessageSummary<InstallSnapshotRequest<C>> for InstallSnapshotRequest<C>
source§impl<C: PartialEq + RaftTypeConfig> PartialEq for InstallSnapshotRequest<C>
impl<C: PartialEq + RaftTypeConfig> PartialEq for InstallSnapshotRequest<C>
source§fn eq(&self, other: &InstallSnapshotRequest<C>) -> bool
fn eq(&self, other: &InstallSnapshotRequest<C>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<C: RaftTypeConfig> Serialize for InstallSnapshotRequest<C>
impl<C: RaftTypeConfig> Serialize for InstallSnapshotRequest<C>
impl<C: Eq + RaftTypeConfig> Eq for InstallSnapshotRequest<C>
impl<C: RaftTypeConfig> StructuralPartialEq for InstallSnapshotRequest<C>
Auto Trait Implementations§
impl<C> Freeze for InstallSnapshotRequest<C>
impl<C> RefUnwindSafe for InstallSnapshotRequest<C>
impl<C> Send for InstallSnapshotRequest<C>
impl<C> Sync for InstallSnapshotRequest<C>
impl<C> Unpin for InstallSnapshotRequest<C>
impl<C> UnwindSafe for InstallSnapshotRequest<C>where
<C as RaftTypeConfig>::NodeId: UnwindSafe + RefUnwindSafe,
<C as RaftTypeConfig>::Node: RefUnwindSafe,
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