Struct openraft::network::snapshot_transport::Chunked
source · pub struct Chunked {}
Expand description
Send and Receive snapshot by chunks.
Trait Implementations§
source§impl<C: RaftTypeConfig> SnapshotTransport<C> for Chunked
impl<C: RaftTypeConfig> SnapshotTransport<C> for Chunked
This chunk based implementation requires SnapshotData
to be AsyncRead + AsyncSeek
.
source§async fn send_snapshot<Net>(
net: &mut Net,
vote: Vote<C::NodeId>,
snapshot: Snapshot<C>,
cancel: impl Future<Output = ReplicationClosed> + OptionalSend + 'static,
option: RPCOption,
) -> Result<SnapshotResponse<C::NodeId>, StreamingError<C, Fatal<C::NodeId>>>where
Net: RaftNetwork<C> + ?Sized,
async fn send_snapshot<Net>(
net: &mut Net,
vote: Vote<C::NodeId>,
snapshot: Snapshot<C>,
cancel: impl Future<Output = ReplicationClosed> + OptionalSend + 'static,
option: RPCOption,
) -> Result<SnapshotResponse<C::NodeId>, StreamingError<C, Fatal<C::NodeId>>>where
Net: RaftNetwork<C> + ?Sized,
Send a snapshot to a target node via
Net
. Read moresource§async fn receive_snapshot(
streaming: &mut Option<Streaming<C>>,
raft: &Raft<C>,
req: InstallSnapshotRequest<C>,
) -> Result<Option<Snapshot<C>>, RaftError<C::NodeId, InstallSnapshotError>>
async fn receive_snapshot( streaming: &mut Option<Streaming<C>>, raft: &Raft<C>, req: InstallSnapshotRequest<C>, ) -> Result<Option<Snapshot<C>>, RaftError<C::NodeId, InstallSnapshotError>>
Receive a chunk of snapshot. If the snapshot is done receiving, return the snapshot. Read more
Auto Trait Implementations§
impl Freeze for Chunked
impl RefUnwindSafe for Chunked
impl Send for Chunked
impl Sync for Chunked
impl Unpin for Chunked
impl UnwindSafe for Chunked
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