Struct openraft::network::snapshot_transport::Streaming
source · pub struct Streaming<C>where
C: RaftTypeConfig,{ /* private fields */ }
Expand description
The Raft node is streaming in a snapshot from the leader.
Implementations§
source§impl<C> Streaming<C>where
C: RaftTypeConfig,
impl<C> Streaming<C>where
C: RaftTypeConfig,
pub fn new(snapshot_id: SnapshotId, snapshot_data: Box<C::SnapshotData>) -> Self
pub fn snapshot_id(&self) -> &SnapshotId
sourcepub fn into_snapshot_data(self) -> Box<C::SnapshotData>
pub fn into_snapshot_data(self) -> Box<C::SnapshotData>
Consumes the Streaming
and returns the snapshot data.
source§impl<C> Streaming<C>
impl<C> Streaming<C>
sourcepub async fn receive(
&mut self,
req: InstallSnapshotRequest<C>
) -> Result<bool, StorageError<C::NodeId>>
pub async fn receive( &mut self, req: InstallSnapshotRequest<C> ) -> Result<bool, StorageError<C::NodeId>>
Receive a chunk of snapshot data.
Auto Trait Implementations§
impl<C> Freeze for Streaming<C>
impl<C> RefUnwindSafe for Streaming<C>
impl<C> Send for Streaming<C>
impl<C> Sync for Streaming<C>
impl<C> Unpin for Streaming<C>
impl<C> UnwindSafe for Streaming<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