pub struct CloudSyncConnection { /* private fields */ }Expand description
CloudSyncObjectStorage that delegates raw I/O to a CloudHome and handles the path
layout and the at-rest protection (its CloudCipher).
Implementations§
Source§impl CloudSyncConnection
impl CloudSyncConnection
pub fn new( home: Arc<dyn ExactCloudHome>, cipher: CloudCipher, blob_paths: BlobPathScheme, store_id: impl Into<String>, keypair: UserKeypair, ) -> Self
Sourcepub fn provider_requests(&self) -> Option<Arc<dyn ProviderRequests>>
pub fn provider_requests(&self) -> Option<Arc<dyn ProviderRequests>>
The running total of provider operations issued through this connection’s home — by this connection and by any other over the same home, which on a device join is how the plaintext bootstrap reads and the encrypted reads after them land in one total.
Sourcepub fn with_blob_chunking(self, chunking: BlobChunking) -> Self
pub fn with_blob_chunking(self, chunking: BlobChunking) -> Self
Seal and read blobs with chunking instead of BlobChunking::DEFAULT.
The chunk size applies to blobs this storage seals from now on; already
stored blobs keep the size their own headers record, so installations
with different settings read each other’s blobs unchanged.
pub fn blob_path_scheme(&self) -> BlobPathScheme
pub fn store_id(&self) -> &str
pub async fn probe(&self) -> Result<(), CloudHomeError>
pub fn uses_identity(&self, identity: &UserKeypair) -> bool
pub fn connection_for_test_identity(&self, identity: UserKeypair) -> Self
pub fn connection_for_test_identity_and_home( &self, identity: UserKeypair, home: Arc<dyn ExactCloudHome>, ) -> Self
pub fn is_plaintext(&self) -> bool
pub fn keyring_facts_for_test(&self) -> Option<CloudKeyringFacts>
pub fn adopt_key_rotation_for_test( &self, encryption: &EncryptionService, custody: &dyn MasterKeyCustody, ) -> Result<String, KeyError>
pub fn mark_rotation_committed_for_test( &self, generation: u64, ) -> Result<(), RotationStateError>
pub fn pending_rotation_generation_for_test(&self) -> Option<u64>
pub fn clear_rotation_gate_for_test(&self)
Trait Implementations§
Source§impl CloudSyncCipherStateAccess for CloudSyncConnection
impl CloudSyncCipherStateAccess for CloudSyncConnection
fn is_plaintext(&self) -> bool
fn suffix(&self) -> &'static str
fn current_generation(&self) -> Option<u64>
fn current_fingerprint(&self) -> Option<String>
fn open( &self, stored: Vec<u8>, aad_context: &[u8], ) -> Result<Vec<u8>, EncryptionError>
fn seal(&self, plaintext: Vec<u8>, aad_context: &[u8]) -> Vec<u8> ⓘ
fn open_sealed_blob_for_test( &self, stored: &[u8], aad_context: &[u8], ) -> Result<(KeyFingerprint, Vec<u8>), EncryptionError>
fn merged_keyring( &self, new_encryption: &EncryptionService, ) -> Result<CloudKeyringMerge, EncryptionError>
fn merge_key_rotation( &self, new_encryption: &EncryptionService, custody: &dyn MasterKeyCustody, ) -> Result<Option<String>, KeyError>
fn adopt_key_rotation( &self, new_encryption: &EncryptionService, custody: &dyn MasterKeyCustody, ) -> Result<AdoptedCloudKeyRotation, KeyError>
Source§impl CloudSyncObjectStorage for CloudSyncConnection
impl CloudSyncObjectStorage for CloudSyncConnection
Source§fn blob_path_scheme(&self) -> BlobPathScheme
fn blob_path_scheme(&self) -> BlobPathScheme
Return the cloud home’s fixed blob path representation.
Source§fn probe_provider<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn probe_provider<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Verify that the retained provider session is reachable and usable.
Source§fn provider_requests(&self) -> Option<Arc<dyn ProviderRequests>>
fn provider_requests(&self) -> Option<Arc<dyn ProviderRequests>>
The running total of provider operations issued through this storage’s
home, so a run’s stage timings can report each stage’s count beside its
wall time.
None when nothing is counting — see
CloudHome::provider_requests.Source§fn set_member_access<'life0, 'async_trait>(
&'life0 self,
state: CloudAccessState,
) -> Pin<Box<dyn Future<Output = Result<CloudAccessOutcome, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn set_member_access<'life0, 'async_trait>(
&'life0 self,
state: CloudAccessState,
) -> Pin<Box<dyn Future<Output = Result<CloudAccessOutcome, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Apply and read back one provider membership-access state.
fn read_blob_tombstone<'life0, 'life1, 'async_trait>(
&'life0 self,
stored: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<Option<Vec<u8>>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_blob_tombstone<'life0, 'life1, 'async_trait>(
&'life0 self,
stored: &'life1 StoredBlobRef,
plaintext: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_blob_tombstones<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<ListedBlobTombstone>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn blob_tombstone_exists<'life0, 'life1, 'async_trait>(
&'life0 self,
stored: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_blob_tombstone<'life0, 'life1, 'async_trait>(
&'life0 self,
stored: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn read_provider_bytes_for_test<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn write_provider_bytes_for_test<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
bytes: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn list_provider_keys_for_test<'life0, 'life1, 'async_trait>(
&'life0 self,
prefix: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn provider_key_exists_for_test<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<bool, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn reserve_cross_principal_response_slot<'life0, 'async_trait>(
&'life0 self,
probe_id: ProviderProbeId,
) -> Pin<Box<dyn Future<Output = Result<ObjectSlot, ProviderProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prepare_cross_principal_challenge<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
publication_journal: &'life1 dyn DeviceJoinChallengePublicationJournal,
probe_id: ProviderProbeId,
store: &'life2 StoreProviderBinding,
context: &'life3 CrossPrincipalChallengeContext,
administrator_signer: &'life4 dyn DeviceSigningAuthority,
) -> Pin<Box<dyn Future<Output = Result<CrossPrincipalProbeChallenge, ProviderProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn settle_cross_principal_challenge<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
publication_journal: &'life1 dyn DeviceJoinChallengePublicationJournal,
authorization: &'life2 DeviceJoinChallengePublicationAuthorization,
challenge: &'life3 CrossPrincipalProbeChallenge,
context: &'life4 CrossPrincipalChallengeContext,
store: &'life5 StoreProviderBinding,
) -> Pin<Box<dyn Future<Output = Result<CrossPrincipalProbeChallenge, ProviderProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn create_cross_principal_response<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
challenge: &'life1 CrossPrincipalProbeChallenge,
context: &'life2 CrossPrincipalResponseContext,
store: &'life3 StoreProviderBinding,
administrator_signing_pubkey: &'life4 str,
peer_signer: &'life5 UserKeypair,
) -> Pin<Box<dyn Future<Output = Result<CrossPrincipalProbeResponse, ProviderProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn complete_cross_principal_probe<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'life6, 'life7, 'async_trait>(
&'life0 self,
journal: &'life1 dyn ProviderProbeJournal,
challenge: &'life2 CrossPrincipalProbeChallenge,
response: &'life3 CrossPrincipalProbeResponse,
context: &'life4 CrossPrincipalResponseContext,
store: &'life5 StoreProviderBinding,
administrator_signer: &'life6 dyn DeviceSigningAuthority,
peer_signing_pubkey: &'life7 str,
) -> Pin<Box<dyn Future<Output = Result<CrossPrincipalProbeReceipt, ProviderProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
'life6: 'async_trait,
'life7: 'async_trait,
fn probe_exact_slots<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
journal: &'life1 dyn ProviderProbeJournal,
probe_id: ProviderProbeId,
binding: &'life2 ResolvedProviderBinding,
) -> Pin<Box<dyn Future<Output = Result<ExactSlotProbeReceipt, ProviderProbeError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn observe_exact_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
slot: &'life1 ObjectSlot,
) -> Pin<Box<dyn Future<Output = Result<Option<ExactObjectRef>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn observe_exact_slot<'life0, 'life1, 'async_trait>(
&'life0 self,
slot: &'life1 ObjectSlot,
) -> Pin<Box<dyn Future<Output = Result<Option<ExactObjectRef>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Observe the exact object identity currently occupying
slot without
opening its protocol bytes.Source§fn delete_exact_slot_and_verify_absent<'life0, 'life1, 'async_trait>(
&'life0 self,
slot: &'life1 ObjectSlot,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_exact_slot_and_verify_absent<'life0, 'life1, 'async_trait>(
&'life0 self,
slot: &'life1 ObjectSlot,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete whatever occupies
slot and prove the exact slot is absent.Source§fn store_blob_key_fingerprint(
&self,
) -> Result<Option<KeyFingerprint>, StorageError>
fn store_blob_key_fingerprint( &self, ) -> Result<Option<KeyFingerprint>, StorageError>
The value identity of the key used for new Store blobs. Browsable homes
have no key fingerprint; the key-bearing service remains inside storage.
Source§fn create_store_key_confirmation(
&self,
creation_id: StoreCreationId,
) -> Result<StoreKeyConfirmation, StorageError>
fn create_store_key_confirmation( &self, creation_id: StoreCreationId, ) -> Result<StoreKeyConfirmation, StorageError>
Create the signed root’s proof that this storage owns the Store key.
Source§fn verify_store_key_confirmation(
&self,
creation_id: StoreCreationId,
confirmation: &StoreKeyConfirmation,
) -> Result<(), StorageError>
fn verify_store_key_confirmation( &self, creation_id: StoreCreationId, confirmation: &StoreKeyConfirmation, ) -> Result<(), StorageError>
Verify the signed root’s Store-key proof with this storage’s retained key.
Source§fn provider_binding<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ResolvedProviderBinding, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn provider_binding<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<ResolvedProviderBinding, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Resolve the provider corpus and authenticated principal used by this
adapter. Registrations bind the principal before allocating descendants.
Source§fn allocate_protocol_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
semantic_prefix: &'life2 str,
extension: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<ObjectSlot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn allocate_protocol_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
semantic_prefix: &'life2 str,
extension: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<ObjectSlot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reserve the exact provider slot for a protocol object.
Source§fn prepare_protocol_object(
&self,
context: &ProtocolObjectContext,
slot: ObjectSlot,
semantic_prefix: &str,
data: Vec<u8>,
) -> Result<PreparedExactObject, StorageError>
fn prepare_protocol_object( &self, context: &ProtocolObjectContext, slot: ObjectSlot, semantic_prefix: &str, data: Vec<u8>, ) -> Result<PreparedExactObject, StorageError>
Seal canonical protocol bytes once and bind their exact stored size/hash.
Source§fn open_prepared_protocol_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn open_prepared_protocol_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Open a locally retained prepared object without fetching it from the
provider. This verifies spool bytes at publication boundaries while the
provider adapter separately proves the stored representation.
Source§fn create_protocol_object<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared: &'life1 PreparedExactObject,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn create_protocol_object<'life0, 'life1, 'async_trait>(
&'life0 self,
prepared: &'life1 PreparedExactObject,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Create the prepared bytes at their reserved slot, settling ambiguous
responses through the provider’s configured exact-upload verification.
A successful return guarantees that every client can immediately read
the object through its exact slot or reference. Prefix listings may lag;
an exact read may not report the created object as absent.
Source§fn create_versioned_protocol_record<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
expected: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<CloudObjectVersion, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn create_versioned_protocol_record<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
expected: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<CloudObjectVersion, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Create one bounded mutable protocol record at its permanent slot and
return the provider revision observed with the exact stored bytes.
Source§fn read_protocol_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
object: &'life2 ExactObjectRef,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_protocol_object<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
object: &'life2 ExactObjectRef,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read and open one exact Store protocol object using the signed
semantic prefix as encryption AAD.
Source§fn read_protocol_object_with_progress<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
object: &'life2 ExactObjectRef,
semantic_prefix: &'life3 str,
progress: DownloadProgress,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_protocol_object_with_progress<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
object: &'life2 ExactObjectRef,
semantic_prefix: &'life3 str,
progress: DownloadProgress,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read and open one exact Store protocol object while reporting cumulative
provider bytes as each response buffer arrives.
Source§fn read_versioned_protocol_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, CloudObjectVersion), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_versioned_protocol_record<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, CloudObjectVersion), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read and open the mutable Store record at
slot, retaining the opaque
provider revision required for its next conditional replacement.Source§fn replace_protocol_record_if_version<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
expected: &'life4 CloudObjectVersion,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<ConditionalWriteOutcome, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn replace_protocol_record_if_version<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
expected: &'life4 CloudObjectVersion,
data: Vec<u8>,
) -> Pin<Box<dyn Future<Output = Result<ConditionalWriteOutcome, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Seal and replace the mutable Store record only if its provider revision
still equals
expected.Source§fn list_protocol_slots<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
listing_prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ObjectSlot>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn list_protocol_slots<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
listing_prefix: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<Vec<ObjectSlot>, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Source§fn read_protocol_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, ExactObjectRef), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_protocol_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, ExactObjectRef), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read one predecessor-reserved successor slot and return both its opened
bytes and the completed exact reference derived from the stored bytes.
Source§fn read_prepared_protocol_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, PreparedExactObject), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn read_prepared_protocol_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
slot: &'life2 ObjectSlot,
semantic_prefix: &'life3 str,
) -> Pin<Box<dyn Future<Output = Result<(Vec<u8>, PreparedExactObject), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Read one predecessor-reserved successor slot while retaining its exact
stored representation for a durable retry journal.
Source§fn delete_protocol_object<'life0, 'life1, 'async_trait>(
&'life0 self,
object: &'life1 ExactObjectRef,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_protocol_object<'life0, 'life1, 'async_trait>(
&'life0 self,
object: &'life1 ExactObjectRef,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete one exact Store protocol object and verify absence.
Source§fn allocate_blob_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
) -> Pin<Box<dyn Future<Output = Result<ObjectSlot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn allocate_blob_slot<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
) -> Pin<Box<dyn Future<Output = Result<ObjectSlot, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Reserve the exact provider slot for a stored blob body.
Source§fn seal_blob_to_spool<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
protection: BlobSpoolProtection,
plaintext_file: &'life4 Path,
spool: AtomicStagedFile,
progress: PreparationProgress,
) -> Pin<Box<dyn Future<Output = Result<BlobSpoolWrite, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn seal_blob_to_spool<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
protection: BlobSpoolProtection,
plaintext_file: &'life4 Path,
spool: AtomicStagedFile,
progress: PreparationProgress,
) -> Pin<Box<dyn Future<Output = Result<BlobSpoolWrite, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Verify one plaintext source against its locator and write the exact stored
representation through the caller-owned spool stage. The stage’s owner
determines the file and directory durability barriers.
Source§fn seal_store_blob_to_spool<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
plaintext_file: &'life4 Path,
spool: AtomicStagedFile,
progress: PreparationProgress,
) -> Pin<Box<dyn Future<Output = Result<BlobSpoolWrite, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn seal_store_blob_to_spool<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
plaintext_file: &'life4 Path,
spool: AtomicStagedFile,
progress: PreparationProgress,
) -> Pin<Box<dyn Future<Output = Result<BlobSpoolWrite, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Seal a Store-audience blob without handing the Store key to the caller.
Source§fn prepare_blob_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
slot: ObjectSlot,
stored_file: &'life4 Path,
) -> Pin<Box<dyn Future<Output = Result<StoredBlobRef, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn prepare_blob_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
locator: &'life1 BlobLocator,
authority: &'life2 BlobWriteAuthority<'life3>,
slot: ObjectSlot,
stored_file: &'life4 Path,
) -> Pin<Box<dyn Future<Output = Result<StoredBlobRef, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Derive an exact reference from an immutable stored blob file.
Source§fn create_blob_object_from_file<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
authority: &'life2 BlobWriteAuthority<'life3>,
stored_file: &'life4 Path,
control: &'life5 UploadControl,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
fn create_blob_object_from_file<'life0, 'life1, 'life2, 'life3, 'life4, 'life5, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
authority: &'life2 BlobWriteAuthority<'life3>,
stored_file: &'life4 Path,
control: &'life5 UploadControl,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
'life5: 'async_trait,
Create the exact stored blob body from its immutable local file.
Source§fn verify_blob_object<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify_blob_object<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Read one exact stored blob body and verify its signed size/hash reference.
Source§fn stage_verified_blob_plaintext<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
protection: BlobSpoolProtection,
plaintext: AtomicStagedFile,
progress: DownloadProgress,
) -> Pin<Box<dyn Future<Output = Result<AtomicStagedFile, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stage_verified_blob_plaintext<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
protection: BlobSpoolProtection,
plaintext: AtomicStagedFile,
progress: DownloadProgress,
) -> Pin<Box<dyn Future<Output = Result<AtomicStagedFile, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Download and exact-verify the stored object into the caller-owned stage,
open it under the audience-owned protection, and return the unpublished
plaintext only after its locator size and hash have also been verified.
Source§fn stage_verified_store_blob_plaintext<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
plaintext: AtomicStagedFile,
progress: DownloadProgress,
) -> Pin<Box<dyn Future<Output = Result<AtomicStagedFile, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn stage_verified_store_blob_plaintext<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
plaintext: AtomicStagedFile,
progress: DownloadProgress,
) -> Pin<Box<dyn Future<Output = Result<AtomicStagedFile, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open and verify a Store-audience blob without exposing the Store key.
Source§fn open_blob_range_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
protection: BlobSpoolProtection,
) -> Pin<Box<dyn Future<Output = Result<BlobRangeReader, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open_blob_range_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
protection: BlobSpoolProtection,
) -> Pin<Box<dyn Future<Output = Result<BlobRangeReader, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open a reader that serves plaintext ranges of a stored blob by fetching
only the sealed chunks covering each range. The ranged counterpart of
Self::stage_verified_blob_plaintext, which materializes the whole
blob; a host seeking around a large blob opens this instead so a range
costs its own bytes rather than the object’s.Source§fn open_store_blob_range_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<BlobRangeReader, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn open_store_blob_range_reader<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<BlobRangeReader, StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Open Store-audience ranges without exposing the Store key.
Source§fn delete_blob_object<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn delete_blob_object<'life0, 'life1, 'async_trait>(
&'life0 self,
blob: &'life1 StoredBlobRef,
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Delete one exact stored blob body.
Source§fn verify_prepared_protocol_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
expected: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn verify_prepared_protocol_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
expected: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Verify that a locally retained prepared object opens to the canonical
bytes its durable journal records.
Source§fn create_verified_protocol_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
expected: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
fn create_verified_protocol_object<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>(
&'life0 self,
context: &'life1 ProtocolObjectContext,
prepared: &'life2 PreparedExactObject,
semantic_prefix: &'life3 str,
expected: &'life4 [u8],
) -> Pin<Box<dyn Future<Output = Result<(), StorageError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
'life4: 'async_trait,
Verify the retained semantic bytes before creating their exact stored
representation at the provider.
Source§impl CloudSyncRotationStateAccess for CloudSyncConnection
impl CloudSyncRotationStateAccess for CloudSyncConnection
fn mark_candidate( &self, generation: u64, mutation: ObjectHash, ) -> Result<(), RotationStateError>
fn mark_committed_mutation( &self, generation: u64, mutation: ObjectHash, ) -> Result<(), RotationStateError>
fn gate(&self) -> Option<RotationGate>
fn install_durable_gate(&self, gate: Option<RotationGate>)
fn check(&self, live_generation: Option<u64>) -> Result<(), RotationPending>
Auto Trait Implementations§
impl Freeze for CloudSyncConnection
impl !RefUnwindSafe for CloudSyncConnection
impl Send for CloudSyncConnection
impl Sync for CloudSyncConnection
impl Unpin for CloudSyncConnection
impl UnsafeUnpin for CloudSyncConnection
impl !UnwindSafe for CloudSyncConnection
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.