pub struct TransferCheckpoint {
pub session_id: String,
pub digest: String,
pub total_size: u64,
pub offset: u64,
pub chunks_completed: u64,
pub partial_sha256: Vec<u8>,
pub upload_session_url: Option<String>,
}Expand description
Checkpoint state for a streaming transfer in progress.
Serializable so it can be persisted to disk and recovered after crash.
Fields§
§session_id: StringUnique transfer session identifier.
digest: StringContent digest being transferred.
total_size: u64Total blob size in bytes.
offset: u64Bytes successfully transferred and checkpointed.
chunks_completed: u64Number of chunks completed.
partial_sha256: Vec<u8>Serialized SHA256 hasher state (intermediate hash of bytes seen so far). We store the hash-so-far as bytes; on resume we cannot truly resume SHA256 mid-stream without re-reading, so this tracks verified offset.
upload_session_url: Option<String>Upload session URL (for OCI chunked upload resume).
Implementations§
Trait Implementations§
Source§impl Clone for TransferCheckpoint
impl Clone for TransferCheckpoint
Source§fn clone(&self) -> TransferCheckpoint
fn clone(&self) -> TransferCheckpoint
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 TransferCheckpoint
impl Debug for TransferCheckpoint
Source§impl<'de> Deserialize<'de> for TransferCheckpoint
impl<'de> Deserialize<'de> for TransferCheckpoint
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 TransferCheckpoint
impl RefUnwindSafe for TransferCheckpoint
impl Send for TransferCheckpoint
impl Sync for TransferCheckpoint
impl Unpin for TransferCheckpoint
impl UnsafeUnpin for TransferCheckpoint
impl UnwindSafe for TransferCheckpoint
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