pub enum UploadSessionLifecycle {
Open {
expires_at_ms: u64,
},
Completed {
completed_at_ms: u64,
content_ref: ContentRef,
},
Aborted {
aborted_at_ms: u64,
},
}Expand description
Monotonic lifecycle of a durable upload session.
A session starts open and ends either completed or aborted. The compare-and-swap that writes the terminal state decides which transition won; provider cleanup happens afterward. Terminal sessions never reopen, so another attempt requires a new session and content id.
Variants§
Open
The one state that may stage bytes and complete. Live until its lease passes, after which garbage collection aborts it.
Fields
Completed
Terminal: the content is durable and verified. This is the only state a receipt may be minted from, and the content reference it carries is what every re-mint and idempotent completion retry answers with.
Fields
completed_at_ms: u64Unix-millisecond stamp written by the completing compare-and-swap, and the only input to when the content may be reclaimed.
content_ref: ContentRefVerified immutable content this session settled on, and the one place a completed session’s reference exists.
Aborted
Terminal: the session will never select content. Its content identity was never published — a receipt exists only for a completed session — so the object it named belongs to nobody and is deleted.
Trait Implementations§
Source§impl Clone for UploadSessionLifecycle
impl Clone for UploadSessionLifecycle
Source§fn clone(&self) -> UploadSessionLifecycle
fn clone(&self) -> UploadSessionLifecycle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more