pub enum UploadSessionMode {
ServiceProxied {
staging: ProxiedStaging,
},
DirectPut {
checksum_algorithm: ChecksumAlgorithm,
},
DirectMultipart {
provider_upload_id: String,
part_size_bytes: NonZeroU64,
checksum_algorithm: ChecksumAlgorithm,
},
}Expand description
Upload mode and its mode-specific state. The mode never changes.
Variants§
ServiceProxied
The service receives the bytes and writes the content object itself, so it learns size and digest from the bytes as they pass.
Fields
staging: ProxiedStagingExclusive staging progress, which applies only to this mode.
DirectPut
The client writes the whole object through one presigned request.
Fields
checksum_algorithm: ChecksumAlgorithmChecksum algorithm chosen when the session began.
DirectMultipart
The client uploads parts and the provider assembles the object.
Multipart sessions do not store a content reference at creation because one-pass and streaming clients may not know the final size or checksum. The client supplies those values at completion, when LoonFS verifies the assembled object.
Fields
provider_upload_id: StringThe provider-side upload the parts assemble through, and the only provider handle LoonFS keeps: parts are the client’s bookkeeping, exactly as they are in the provider’s own API, so there is no durable record per part.
part_size_bytes: NonZeroU64Byte length of every part except the last, settled at begin.
A session resumed after a lost begin response reads its geometry from here rather than being told a second, possibly different, one. Zero is not a geometry, so it is not representable.
checksum_algorithm: ChecksumAlgorithmChecksum algorithm chosen when the session began. Part signing and completion continue to use it after a restart.
Implementations§
Source§impl UploadSessionMode
impl UploadSessionMode
Sourcepub fn checksum_algorithm(&self) -> Option<ChecksumAlgorithm>
pub fn checksum_algorithm(&self) -> Option<ChecksumAlgorithm>
Returns the checksum algorithm fixed by a direct upload mode.