Skip to main content

Storage

Trait Storage 

Source
pub trait Storage: Send + Sync {
Show 35 methods // Required methods fn config(&self) -> StorageConfig; fn single_request_limit(&self) -> u64; fn create_reporting<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, bytes: &'life2 [u8], sent: &'life3 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait; fn replace<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, previous: &'life1 StoredObject, bytes: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn status<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn stream_object_reporting<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, received: &'life2 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<ObjectStream<'life0>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait; fn list<'life0, 'life1, 'async_trait>( &'life0 self, prefix: &'life1 ObjectPrefix, ) -> Pin<Box<dyn Future<Output = Result<Vec<StoredObject>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn delete<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn grant_access<'life0, 'life1, 'async_trait>( &'life0 self, account: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<AccessGrant, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn revoke_access<'life0, 'life1, 'async_trait>( &'life0 self, account: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RetainedAccess>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn begin_upload<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, total: u64, ) -> Pin<Box<dyn Future<Output = Result<UploadSession, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn begin_replace<'life0, 'life1, 'async_trait>( &'life0 self, previous: &'life1 StoredObject, total: u64, ) -> Pin<Box<dyn Future<Output = Result<UploadSession, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn resume_upload<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 mut UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn admit_part<'a>( &self, session: &mut UploadSession, bytes: &'a [u8], ) -> Result<PartPermit<'a>, StorageError>; fn send_part<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, permit: PartPermit<'life1>, session: &'life2 mut UploadSession, sent: &'life3 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait; fn send_independent_part<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session: &'life1 UploadSession, offset: u64, bytes: &'life2 [u8], sent: &'life3 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<ConfirmedPart, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait; fn finish_upload<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 mut UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn abort_upload<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait; fn end_superseded_floor_sessions<'life0, 'async_trait>( &'life0 self, store: StoreId, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn end_settled_claims<'life0, 'async_trait>( &'life0 self, store: StoreId, through: u64, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; fn end_device_uploads<'life0, 'async_trait>( &'life0 self, store: StoreId, device: DeviceId, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait; // Provided methods fn set_s3_credentials<'life0, 'async_trait>( &'life0 self, _credentials: S3Credentials, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait { ... } fn account<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait { ... } fn read_part_size(&self) -> Option<NonZero<u64>> { ... } fn set_oauth_tokens<'life0, 'async_trait>( &'life0 self, _tokens: OAuthTokens, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, Self: 'async_trait { ... } fn create<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, bytes: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait { ... } fn stream_object<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, ) -> Pin<Box<dyn Future<Output = Result<ObjectStream<'life0>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn read_object<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, ) -> Pin<Box<dyn Future<Output = Result<ObjectRead, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn read<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn read_range<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: ByteRange, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn delete_if_present<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn join<'life0, 'life1, 'async_trait>( &'life0 self, store: StoreId, invitation: &'life1 StorageInvitation, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn leave<'life0, 'life1, 'async_trait>( &'life0 self, invitation: &'life1 StorageInvitation, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn restart_upload<'life0, 'life1, 'async_trait>( &'life0 self, expired: &'life1 UploadSession, ) -> Pin<Box<dyn Future<Output = Result<UploadSession, StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait { ... } fn upload_part<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 mut UploadSession, bytes: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>> where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait { ... }
}
Expand description

The operations coven needs from a provider (§20.1).

Implementations are capabilities assembled at composition roots. They own no database or key custody. Every mutation is awaited and failures reach the caller; no hidden background work repairs failed operations.

Required Methods§

Source

fn config(&self) -> StorageConfig

This provider’s nonsecret location settings.

Source

fn single_request_limit(&self) -> u64

Largest complete encrypted body the provider takes in one request, in bytes. Objects past it, or past crate::BUFFERED_REQUEST_LIMIT, go in parts through resumable or multipart uploads (crate::goes_in_parts). Buffered floor replacements accept complete bodies up to this limit; OneDrive stages the body in a revision-bound session before conditional publication. Callers retaining sessions across crashes record begin_upload or begin_replace sessions. S3 uses 5 GiB, Dropbox 150 MiB and OneDrive 250,000,000 bytes. CloudKit uses bounded 8 MiB assets.

Source

fn create_reporting<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, bytes: &'life2 [u8], sent: &'life3 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Self::create, telling sent how many of the object’s bytes the connection has taken, as it takes them: Dropbox’s, OneDrive’s and S3’s bodies say as they go, CloudKit’s client as the fraction of each asset sent (§6.7).

Source

fn replace<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, previous: &'life1 StoredObject, bytes: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Replace the floor only if its observed native revision still matches. A stale observation returns Conflict without changing the object. The new bytes become visible together, or not at all. A body above Self::single_request_limit returns StorageFailure::SingleRequestTooLarge.

Source

fn status<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Exact lookup. None means confirmed absence; failed lookups remain errors. Pending multipart assets must not be reported as complete objects.

Source

fn stream_object_reporting<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, received: &'life2 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<ObjectStream<'life0>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Self::stream_object, telling received how far through the object the bytes received reach, as they arrive: as the stream reads them, and for CloudKit, whose client fetches a record’s asset whole, as the fetch goes (§6.7).

Source

fn list<'life0, 'life1, 'async_trait>( &'life0 self, prefix: &'life1 ObjectPrefix, ) -> Pin<Box<dyn Future<Output = Result<Vec<StoredObject>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

List every object under the prefix, across all pages. Missing or malformed metadata fails the call.

Source

fn delete<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Delete an object. An already absent object succeeds, making operation retries safe. Sync chooses the deleting device under §16.6; storage exposes no deletion-rights query. A provider refusal retains its cause, including a refused owned-object deletion.

Source

fn grant_access<'life0, 'life1, 'async_trait>( &'life0 self, account: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<AccessGrant, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Share the store using its owner’s account, or tell an S3 admin to create a key. A signed-in sharing account that does not own the location gets NotStoreOwner. Ownership comes from Dropbox’s folder access_type, OneDrive’s current-account drive id, or CloudKit’s current user record id compared with the zone owner. S3’s console-key instructions need no sharing-account check. Inviting the account that holds the store gets StorageFailure::InviteeIsStoreOwner. Dropbox and OneDrive refuse before any sharing change; CloudKit learns it from the saved share, which then lists only the owner.

Dropbox upgrades viewers in place with update_folder_member; a pending viewer without a native account id gets StorageFailure::AccountIdUnavailable and keeps its invitation.

Source

fn revoke_access<'life0, 'life1, 'async_trait>( &'life0 self, account: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<RetainedAccess>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Unshare through the owner’s account. Coven shares nothing on S3, so there is nothing to take back. Ownership is checked as for Self::grant_access. Only grants exclusive to this account are removed; owner, inherited, shared or unidentified grants are returned for owner action. An empty list confirms revocation.

OneDrive resolves native identities across all permission pages and keeps email-bearing grants until dependent ID-only removals succeed. Dropbox pages direct and inherited memberships separately and waits for the native removal job, preserving its failure cause; group and parent access remain reported.

Source

fn begin_upload<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, total: u64, ) -> Pin<Box<dyn Future<Output = Result<UploadSession, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Begin a create-once upload, returning the value to record before parts are sent. This also creates an absent floor without exposing partial bytes.

Source

fn begin_replace<'life0, 'life1, 'async_trait>( &'life0 self, previous: &'life1 StoredObject, total: u64, ) -> Pin<Box<dyn Future<Output = Result<UploadSession, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Begin a floor upload bound to this observed native revision. Record it before sending parts; restarting never adopts a newer revision.

Source

fn resume_upload<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 mut UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Refresh a recorded session from the provider after interruption. Persist the returned state even on failure, as with finish_upload.

Source

fn admit_part<'a>( &self, session: &mut UploadSession, bytes: &'a [u8], ) -> Result<PartPermit<'a>, StorageError>

Admit bytes as the session’s next part, the first it has still to send (UploadSession::parts_to_send), sending nothing. Refused while a provider cooldown is live, for a session naming another location, for a part that doesn’t fit the session, and while its destination can’t be published (§17.9). Admitting a planned session’s first part marks its plan, before any request that may start its upload: when PartPermit::marked says so, save the session before sending the part (Appendix E.10).

Source

fn send_part<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, permit: PartPermit<'life1>, session: &'life2 mut UploadSession, sent: &'life3 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Send an admitted part, advancing the value only after confirmation, and telling sent how far through the object the part’s bytes the connection has taken reach, as Self::create_reporting does. After a lost publication reply this verifies the stored bytes instead; see UploadSession.

Source

fn send_independent_part<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, session: &'life1 UploadSession, offset: u64, bytes: &'life2 [u8], sent: &'life3 ByteProgress, ) -> Pin<Box<dyn Future<Output = Result<ConfirmedPart, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, Self: 'async_trait,

Send part offset.. of a session whose parts are independent (UploadSession::parts_independent), leaving the session as it is: the provider’s confirmation comes back, for the caller to add with UploadSession::confirm and then record. Several parts may be in flight at once and come back in any order (§17.9). Refused, sending nothing, while a provider cooldown is live, for a session naming another location or whose parts go in order, for a part that isn’t a whole one the session lacks, and while its destination can’t be published. sent hears the part’s bytes as Self::send_part’s do.

Source

fn finish_upload<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 mut UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Publish all stored parts at the destination. A repeated completion is safe. Persist the session even on failure. SessionExpired requires a fresh session with the same bytes; a Cleanup error must not bypass failed abort.

Source

fn abort_upload<'life0, 'life1, 'async_trait>( &'life0 self, session: &'life1 UploadSession, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Explicitly abandon an upload. Dropping a recorded value does not abort it. Already closed or absent sessions succeed; published objects are preserved.

Source

fn end_superseded_floor_sessions<'life0, 'async_trait>( &'life0 self, store: StoreId, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

End every unfinished session at store’s floor begun before the current floor was published, whoever began it (§17.10): each observed an older revision, so none can publish. Only where the provider dates a session’s start, certified per S3 profile (Appendix E.6); elsewhere it sends nothing.

Source

fn end_settled_claims<'life0, 'async_trait>( &'life0 self, store: StoreId, through: u64, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

End every unfinished session at slots 1 to through of store, which this device has applied, whoever began it (§17.10): create-once refuses each of them there, so none can ever publish, and a claimant whose session is ended settles its claim as lost, as a refused one does. Ending one already ended succeeds. Only S3 under conditional completion puts a claim’s session at its slot’s path.

Source

fn end_device_uploads<'life0, 'async_trait>( &'life0 self, store: StoreId, device: DeviceId, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

End every upload device left in store that this sign-in can see (§17.10): abort its unfinished sessions and delete what it staged in its reserved folder. One already ended succeeds, so devices may do it at once. A Dropbox session, and a OneDrive native one, is seen by no one else and expires on its own: on Dropbox this ends nothing, and on OneDrive only staged temporaries (Appendix E.2).

Provided Methods§

Source

fn set_s3_credentials<'life0, 'async_trait>( &'life0 self, _credentials: S3Credentials, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Install a member’s replacement S3 key after credential custody commits. Other provider kinds refuse this operation without changing sign-in state.

Source

fn account<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = Result<String, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

The signed-in sharing account, for the member’s admin access entry. S3 uses its supplied access key id instead of an account lookup.

Source

fn read_part_size(&self) -> Option<NonZero<u64>>

The size of the parts a ranged read moves whole, counted from the object’s start, the last shorter: a range moves every part it touches, as iCloud’s reads do (Appendix E.1). None when a range moves only its own bytes.

Source

fn set_oauth_tokens<'life0, 'async_trait>( &'life0 self, _tokens: OAuthTokens, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Install replacement OAuth tokens after the owner commits them to key custody. S3 and CloudKit refuse OAuth tokens; they use different account credentials.

Source

fn create<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, bytes: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<Option<StoredObject>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Create a complete encrypted object, refusing an occupied path with StorageFailure::AlreadyExists. Occupation alone proves nothing: a retry compares the occupant’s complete bytes itself (§5.1, §19.3). Bodies crate::goes_in_parts sends in parts use a session; a writes slot can contain multiple writes in one object. A failed transfer aborts the session; if abort fails too, StorageError::Cleanup retains both causes. Returns the object’s metadata when the provider’s one-request reply carries it; otherwise exact status supplies it (§21.1).

Source

fn stream_object<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, ) -> Pin<Box<dyn Future<Output = Result<ObjectStream<'life0>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Read bytes and metadata from the same object revision. A range still reports the complete encrypted size and whole-object checksum semantics.

Source

fn read_object<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: Option<ByteRange>, ) -> Pin<Box<dyn Future<Output = Result<ObjectRead, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Collect a bounded response through the streaming implementation. Large writes and snapshots consume stream_object directly. This convenience reader holds at most 32 MiB, regardless of provider metadata.

Source

fn read<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Read a bounded whole encrypted object; the limit is the same as read_object.

Source

fn read_range<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, range: ByteRange, ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Fetch only the requested bytes; never silently shorten a range.

Source

fn delete_if_present<'life0, 'life1, 'async_trait>( &'life0 self, path: &'life1 ObjectPath, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Self::delete for a caller that wants the object gone and has no use for the difference between deleting it and finding nothing: a NotFound failure, such as a provider reporting its folder missing, is done too. Every other failure reaches the caller.

Source

fn join<'life0, 'life1, 'async_trait>( &'life0 self, store: StoreId, invitation: &'life1 StorageInvitation, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Finish provider onboarding under the invited account, then check that the location can be read. The facade verifies coven’s store identity and keys. Dropbox mounts the shared namespace. OneDrive checks the share’s drive/folder before redeeming it; CloudKit checks share metadata before native acceptance. Native acceptance material comes from the encrypted crate::StorageInvitation, not a revocation grant id. Removal during joining returns the provider’s permission failure; an admin can invite again.

Source

fn leave<'life0, 'life1, 'async_trait>( &'life0 self, invitation: &'life1 StorageInvitation, ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Undo Self::join’s acceptance under the invited account, for a join cancelled before its request was sent, keeping the invite usable (§13.2, E.2). Dropbox unmounts the shared namespace, which leaves the account a member, so joining again mounts it again; finding it unmounted already, or the account no longer a member, is done. S3 accepts nothing. OneDrive and CloudKit undo nothing: Graph documents no way for the recipient to give up a redeemed link’s access, and a CloudKit participant that deletes the share is removed from it.

Source

fn restart_upload<'life0, 'life1, 'async_trait>( &'life0 self, expired: &'life1 UploadSession, ) -> Pin<Box<dyn Future<Output = Result<UploadSession, StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, Self: 'async_trait,

Begin a fresh recorded session after resumption or publication reports SessionExpired. A conflicted S3 session must be aborted first; failed cleanup prevents a replacement from starting. The destination and total stay fixed; the caller records the returned value and supplies the retained encrypted bytes again, starting at offset zero.

Source

fn upload_part<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, session: &'life1 mut UploadSession, bytes: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>
where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Self: 'async_trait,

Admit and send the next part, for a caller that records the session only after the part: one that never resumes a planned session from a recording.

Implementors§