pub trait CloudContentUploadBackend: Send + Sync {
// Required methods
fn start_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadSession>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn upload_chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
chunk: &'life2 ContentUploadChunk,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadChunkAck>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn reconcile_upload_chunk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
session: &'life2 ContentUploadSession,
chunk: &'life3 ContentUploadChunk,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadChunkAck>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn commit_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
session: &'life2 ContentUploadSession,
) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn reconcile_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Product-owned resumable upload transport.
Required Methods§
Sourcefn start_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadSession>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Starts or idempotently resumes a backend session for one immutable upload intent.
Sourcefn upload_chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
chunk: &'life2 ContentUploadChunk,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadChunkAck>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn upload_chunk<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
chunk: &'life2 ContentUploadChunk,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadChunkAck>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Uploads one exact immutable chunk.
Sourcefn reconcile_upload_chunk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
session: &'life2 ContentUploadSession,
chunk: &'life3 ContentUploadChunk,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadChunkAck>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn reconcile_upload_chunk<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
session: &'life2 ContentUploadSession,
chunk: &'life3 ContentUploadChunk,
) -> Pin<Box<dyn Future<Output = BackendResult<ContentUploadChunkAck>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reconciles a chunk that may already have been accepted before its durable checkpoint.
Backends with strict offset semantics return the current accepted offset for the exact
(session, offset, bytes) replay.
Sourcefn commit_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
session: &'life2 ContentUploadSession,
) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn commit_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
session: &'life2 ContentUploadSession,
) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Conditionally and idempotently commits the fully uploaded content.
The runner may call this again from a durable RemoteCommitting record. If transport
completion leaves the remote effect ambiguous, return
MutationRemoteOutcome::RemoteOutcomeUnknown instead of a backend error so recovery uses
Self::reconcile_upload.
Sourcefn reconcile_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reconcile_upload<'life0, 'life1, 'async_trait>(
&'life0 self,
intent: &'life1 ContentUploadIntent,
) -> Pin<Box<dyn Future<Output = BackendResult<MutationRemoteOutcome>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Reconciles a commit whose transport outcome did not prove whether it succeeded.