Skip to main content

Module cloud

Module cloud 

Source
Expand description

CloudHome: low-level cloud storage abstraction.

Each backend (S3, R2, B2, etc.) implements CloudHome – 8 methods for raw bytes in/out. No encryption, no path layout knowledge, no sync semantics. Higher-level concerns live in CloudSyncConnection which wraps any dyn CloudHome and applies the path layout and at-rest protection.

Re-exports§

pub use setup::SetupError;

Modules§

cloudkit
CloudKit-backed CloudHome implementation.
dropbox
Dropbox CloudHome implementation.
google_drive
Google Drive CloudHome implementation.
oauth_session
Shared OAuth token lifecycle for the consumer-cloud backends.
onedrive
OneDrive CloudHome implementation.
s3
S3-backed CloudHome implementation.
setup
Cloud provider setup and management.
test_utils
In-process CloudHome implementation for tests. Records every write keyed by cloud_key so tests can read back exactly what landed, and serves reads from the same map — enough to simulate two devices sharing a cloud bucket.

Structs§

BlobBody
A blob as a sized stream of already-final bytes: sealed chunks for an encrypted home, plaintext for a browsable one. Encryption-agnostic and concrete (no dyn Stream). next_part hands the bytes to a streaming upload in bounded windows so a large blob is never held whole in memory; the only collect is the single-request path for blobs at or below a provider’s multipart threshold.
CloudHomeFactory
CloudObjectVersion
Opaque provider revision for an exact mutable object.
CloudVersionedObject
CountingCloudHome
A cloud home that counts what is asked of it and forwards everything else.
ExactUpload
One immutable exact object together with a replayable source for its final stored bytes. Provider adapters derive their own native checksums from this source and can reopen it after an ambiguous create response.
PreparedOAuthCloudHome
UploadControl
One exact upload’s progress reporting and absolute pause state. Provider request bodies consult this before yielding each network chunk, so pausing stops the active request without closing its upload session; resuming lets that same request continue from the next byte.

Enums§

CloudAccessOutcome
CloudAccessState
CloudFileReadError
CloudHomeError
Errors from raw cloud storage operations.
CloudHomeJoinInfo
Information needed to join a cloud home from another device.
CloudRuntimeError
A failure to start or execute work on Coven’s cloud runtime.
ConditionalWriteOutcome
ExactCreateOutcome
ExactUploadSource
RevokeOutcome
Whether a backend actually withdrew a removed member’s storage credential.

Traits§

CloudHome
ExactCloudHome
A cloud home admitted to sync: raw object operations and exact immutable slots are one provider capability, so callers cannot open the home and then ask it to hand back a second provider object.
ExactSlotStorage
Low-level cloud storage. Implementations handle a single store.
PartSink
The one per-provider streaming-upload surface: a session that accepts ordered parts and commits. The central write_blob driver opens one of these for a large blob and pumps BlobBody parts into it — no backend writes its own upload loop, collect, or progress call.

Functions§

no_download_progress
no_preparation_progress
no_progress
A progress sink that discards its reports. For write calls whose payload is a small control file (head pointers, the snapshot) where no per-file progress bar is driven — only the blob outbox surfaces progress.
write_cloud_object_stream

Type Aliases§

BoxPartSink
A boxed PartSink borrowing its home for 'a.
CloudObjectStream
DownloadProgress
Reports how many bytes of a cloud object have arrived from the provider. The count is cumulative and advances once per received stream buffer.
PreparationProgress
Reports how many plaintext source bytes have been consumed while a durable upload spool is being prepared. Owned because the reader that produces the sealed body retains it for the lifetime of that stream.
UploadProgress
Reports how many bytes of a write have reached the backend so far. Called with the cumulative byte count as the body uploads; backends that can’t observe sub-call progress call it once at the end with the full size. The count is of the bytes handed to write (the encrypted payload).