pub enum RoundOperation<'a> {
UploadGrant {
blob_id: &'a str,
byte_length: u64,
media_type: Option<&'a str>,
},
UploadPut {
url: &'a str,
bytes: &'a [u8],
media_type: Option<&'a str>,
},
Upload {
blob_id: &'a str,
bytes: &'a [u8],
media_type: Option<&'a str>,
},
Sync {
request: &'a [u8],
realtime: bool,
},
Downloads(&'a [SegmentFetch]),
}Expand description
One network operation of a prepared round.
A host that cannot block (a browser worker with fetch, a single-threaded
runtime) drives a round with PreparedSyncRound::next_operation,
performs the operation with its own I/O, and returns the result with
PreparedSyncRound::submit. A host with a blocking Transport calls
PreparedSyncRound::exchange, which runs the same operations in order.
Variants§
UploadGrant
POST <mount>/blobs/{blob_id}/upload-grant (§5.9.3).
UploadPut
PUT the presigned upload url the grant returned. A failure falls back
to RoundOperation::Upload with the same body.
Upload
PUT <mount>/blobs/{blob_id} through the direct endpoint.
Sync
The combined push+pull message. realtime selects the socket path
(§8.7, Transport::realtime_sync) instead of POST /sync (§1.5).
Downloads(&'a [SegmentFetch])
Every eligible segment body of the response, in wire order (§5.4 / §5.5). Fetch them in parallel if the host can; the core consumes the results in order and stops at the first failure.