pub struct ContentUploadRunner { /* private fields */ }Expand description
Runtime-neutral driver for resumable immutable-snapshot uploads.
The runner does not spawn tasks, sleep, choose retry delays, allocate operation identities, or own product transport. One invocation advances a durable record until it completes, reaches an unknown remote outcome, is fenced, or returns the first backend/store/contract failure.
Implementations§
Source§impl ContentUploadRunner
impl ContentUploadRunner
Sourcepub fn new(chunk_size: usize) -> Result<Self>
pub fn new(chunk_size: usize) -> Result<Self>
Creates a runner with a non-zero in-memory chunk size.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub const fn chunk_size(&self) -> usize
pub const fn chunk_size(&self) -> usize
Returns the maximum immutable byte count submitted in one backend chunk.
Sourcepub async fn submit(
&self,
intent: ContentUploadIntent,
execution_generation: SessionGeneration,
store: &dyn ContentUploadStore,
backend: &dyn CloudContentUploadBackend,
source: &dyn LocalContentSnapshotReader,
) -> ContentUploadRunResult<ContentUploadRunOutcome>
pub async fn submit( &self, intent: ContentUploadIntent, execution_generation: SessionGeneration, store: &dyn ContentUploadStore, backend: &dyn CloudContentUploadBackend, source: &dyn LocalContentSnapshotReader, ) -> ContentUploadRunResult<ContentUploadRunOutcome>
Persists a caller-owned upload intent, then advances its durable record.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Sourcepub async fn resume(
&self,
operation_id: &OperationId,
execution_generation: SessionGeneration,
store: &dyn ContentUploadStore,
backend: &dyn CloudContentUploadBackend,
source: &dyn LocalContentSnapshotReader,
) -> ContentUploadRunResult<ContentUploadRunOutcome>
pub async fn resume( &self, operation_id: &OperationId, execution_generation: SessionGeneration, store: &dyn ContentUploadStore, backend: &dyn CloudContentUploadBackend, source: &dyn LocalContentSnapshotReader, ) -> ContentUploadRunResult<ContentUploadRunOutcome>
Advances one already-persisted upload using the active executor generation.
§Errors
Returns an error when validation fails or an underlying backend, store, or platform operation fails.
Trait Implementations§
Source§impl Clone for ContentUploadRunner
impl Clone for ContentUploadRunner
Source§fn clone(&self) -> ContentUploadRunner
fn clone(&self) -> ContentUploadRunner
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more