pub enum Event {
Started {
oid: String,
size: u64,
},
Progress {
oid: String,
bytes_done: u64,
},
Completed {
oid: String,
},
Failed {
oid: String,
error: String,
},
}Expand description
Per-object lifecycle events emitted by
Transfer::download and
Transfer::upload.
Sent on the optional tokio::sync::mpsc::UnboundedSender
passed in by the caller. Order across objects is unspecified;
events for a single object are ordered (Started → Progress* →
Completed | Failed).
Failed carries a stringified error so the typed
TransferError can still be moved into
Report; events are for display, the report is
authoritative.
Variants§
Started
Transfer for oid is about to start.
size is the byte count the server reported (or the local
size, for uploads).
Progress
bytes_done cumulative bytes have moved for this object so far.
May fire many times per object; consumers should treat values as monotonically non-decreasing.
Completed
Transfer succeeded.
For downloads, bytes are in the store and hash-verified; for uploads, the server’s verify callback (if any) has returned 2xx.
Failed
Transfer failed after exhausting retries.