pub enum TransferEvent {
Show 15 variants
SessionCreated {
blob: String,
session_id: String,
size: u64,
resume_offset: u64,
},
SessionResumed {
blob: String,
session_id: String,
size: u64,
offset: u64,
},
ChunkSent {
blob: String,
session_id: String,
offset: u64,
len: u64,
},
ChunkAcked {
blob: String,
session_id: String,
offset: u64,
len: u64,
acked_offset: u64,
},
ChunkRetried {
blob: String,
session_id: String,
offset: u64,
len: u64,
reason: RetryReason,
},
ChecksumRejected {
blob: String,
session_id: String,
offset: u64,
len: u64,
},
Finalize {
blob: String,
session_id: String,
size: u64,
},
Merged {
blob: String,
asset_ref: String,
},
Verify {
asset_id: String,
durable: bool,
blobs: u64,
not_durable: u64,
},
Receipt {
asset_id: String,
blob: String,
receipt_seq: u64,
},
RangeRequested {
blob: String,
offset: u64,
max_len: Option<u64>,
},
RangeReceived {
blob: String,
offset: u64,
len: u64,
},
FetchRetried {
blob: String,
offset: u64,
stalled: bool,
wait_ms: u64,
},
FetchVerified {
blob: String,
size: u64,
},
IntegrityRejected {
blob: String,
size: u64,
},
}Expand description
One step of a transfer.
blob is always the blob’s content address (lowercase hex). Offsets and lengths are bytes of
ciphertext.
Variants§
SessionCreated
POST /upload opened a session. resume_offset is non-zero when the server returned an
existing active session for the same blob (the idempotent re-create).
Fields
SessionResumed
An existing session was resumed from the offset HEAD reported.
Fields
ChunkSent
A chunk left the client (PATCH /upload/{id}).
Fields
ChunkAcked
The server acknowledged a chunk. acked_offset is the server’s new received-byte count,
which is offset + len unless the server kept less (a short write).
Fields
ChunkRetried
A chunk will be sent again, or the transfer moves to another offset or session.
Fields
reason: RetryReasonWhy.
ChecksumRejected
The server refused a chunk whose body did not match its X-Capsule-Checksum
(checksum_mismatch); nothing was persisted and the same chunk is re-sent.
Fields
Finalize
Every declared byte reached the server; it is finalizing the blob.
Fields
Merged
The server already held this blob (duplicate_blob): resolved as a merge, nothing sent.
Fields
Verify
POST /storage/verify answered for an asset.
Fields
Receipt
A custody receipt for one blob verified under the pinned attestation keys.
Fields
RangeRequested
A ranged request for a blob left the client. max_len is the bounded window, or None
for the open-ended remainder.
Fields
RangeReceived
Bytes of a ranged request landed.
Fields
FetchRetried
A ranged request brought nothing; the fetch backs off and resumes from the same offset.
stalled is set when no bytes arrived for the stall bound.
Fields
FetchVerified
The fetched bytes hashed to the requested content address.
IntegrityRejected
The fetched bytes did not hash to the requested content address; they are discarded.
Trait Implementations§
Source§impl Clone for TransferEvent
impl Clone for TransferEvent
Source§fn clone(&self) -> TransferEvent
fn clone(&self) -> TransferEvent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TransferEvent
impl Debug for TransferEvent
Source§impl<'de> Deserialize<'de> for TransferEvent
impl<'de> Deserialize<'de> for TransferEvent
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>,
impl Eq for TransferEvent
Source§impl From<TransferEvent> for FfiTransferEvent
impl From<TransferEvent> for FfiTransferEvent
Source§fn from(event: TransferEvent) -> Self
fn from(event: TransferEvent) -> Self
Source§impl PartialEq for TransferEvent
impl PartialEq for TransferEvent
Source§fn eq(&self, other: &TransferEvent) -> bool
fn eq(&self, other: &TransferEvent) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TransferEvent
impl Serialize for TransferEvent
impl StructuralPartialEq for TransferEvent
Auto Trait Implementations§
impl Freeze for TransferEvent
impl RefUnwindSafe for TransferEvent
impl Send for TransferEvent
impl Sync for TransferEvent
impl Unpin for TransferEvent
impl UnsafeUnpin for TransferEvent
impl UnwindSafe for TransferEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
§unsafe fn clone_handle(handle: Handle) -> Handle
unsafe fn clone_handle(handle: Handle) -> Handle
§unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
unsafe fn consume_handle(handle: Handle) -> Arc<T> ⓘ
Arc<> Read more§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more