pub struct ResumableTransfer { /* private fields */ }Expand description
Durable transfer state can serialize manifest plus the accepted chunk
digests. Retries may safely submit any chunk again.
Implementations§
Source§impl ResumableTransfer
impl ResumableTransfer
pub fn new(manifest: ChunkManifest) -> Self
pub fn manifest(&self) -> &ChunkManifest
pub fn accept_chunk( &mut self, index: u32, bytes: Vec<u8>, ) -> Result<bool, TransferError>
pub fn missing_chunks(&self) -> Vec<u32>
pub fn received_bytes(&self) -> u64
pub fn assemble(&self) -> Result<Vec<u8>, TransferError>
Trait Implementations§
Source§impl Clone for ResumableTransfer
impl Clone for ResumableTransfer
Auto Trait Implementations§
impl Freeze for ResumableTransfer
impl RefUnwindSafe for ResumableTransfer
impl Send for ResumableTransfer
impl Sync for ResumableTransfer
impl Unpin for ResumableTransfer
impl UnsafeUnpin for ResumableTransfer
impl UnwindSafe for ResumableTransfer
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