pub enum CreateOutcome {
Created {
response: CreateSessionResponse,
resume_offset: u64,
committed: Option<CommittedSet>,
advice: ServerAdvice,
expiry: SessionExpiry,
status: Option<String>,
},
AlreadyStored {
asset_ref: String,
},
}Expand description
How POST /upload resolved.
Variants§
Created
A session to transfer into. resume_offset is the authoritative
received-byte count: 0 on a fresh create (201); on an idempotent
re-create the server returns the existing active session (200) with
its current X-Capsule-Offset, so the client resumes without a HEAD.
Fields
response: CreateSessionResponseThe session body (id, advisory URL, suggested chunk size).
committed: Option<CommittedSet>The resumed session’s full committed set (X-Capsule-Committed) on a 200. Absent
on a fresh session, from an older server, and when the header is malformed.
advice: ServerAdviceThe server’s advice (X-Capsule-Advice), already clamped; absent from an older
server.
expiry: SessionExpiryThe session’s remaining lifetime, relative to this response.
AlreadyStored
The server already holds this exact ciphertext (duplicate_blob): resolve
as a merge,
not a transfer. Carries the existing asset reference.
Trait Implementations§
Source§impl Clone for CreateOutcome
impl Clone for CreateOutcome
Source§fn clone(&self) -> CreateOutcome
fn clone(&self) -> CreateOutcome
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for CreateOutcome
impl RefUnwindSafe for CreateOutcome
impl Send for CreateOutcome
impl Sync for CreateOutcome
impl Unpin for CreateOutcome
impl UnsafeUnpin for CreateOutcome
impl UnwindSafe for CreateOutcome
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, 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