pub enum StorageConfig {
S3 {
bucket: String,
region: String,
endpoint: Option<Url>,
profile: Option<S3Profile>,
},
Dropbox {
location: DropboxLocation,
account_label: Option<String>,
folder_label: Option<FolderLabel>,
},
OneDrive {
drive_id: String,
folder_id: String,
account_label: Option<String>,
folder_label: Option<FolderLabel>,
},
CloudKit {
container: String,
owner: String,
zone: String,
},
}Expand description
The store’s location; credentials are kept separately in key custody.
Variants§
S3
An existing S3 bucket, which the store has to itself: coven can’t tell how far a member’s key reaches, so it takes every key to reach the whole bucket (§20.7). Paths start at the bucket’s root.
Fields
profile: Option<S3Profile>A catalogued service’s name or custom settings; either must agree with a catalogued endpoint host. None selects by host: storage.googleapis.com is GCS XML, hosts ending in .r2.cloudflarestorage.com are R2, no endpoint or .amazonaws.com is AWS, and setup detects any other endpoint’s settings, recording them as Custom. All run the setup checks.
Dropbox
Dropbox’s access and location, fixed when cloud storage is created.
Fields
location: DropboxLocationRequired choice: not-shared App folder or a shared-capable namespace.
account_label: Option<String>Signed-in member’s display label; absent before setup. Never routes or authorizes.
folder_label: Option<FolderLabel>The shared folder’s name and web address as the latest connection read them; absent before setup and in the App folder (§20.2).
OneDrive
A OneDrive folder; paths within it start with the store id.
Fields
account_label: Option<String>Signed-in member’s display label; absent before setup. Never routes or authorizes.
folder_label: Option<FolderLabel>The folder’s name and web address as the latest connection read them; absent before setup (§20.2).
CloudKit
The custom zone reached by the built-in CloudKit adapter.
Implementations§
Source§impl StorageConfig
impl StorageConfig
Sourcepub fn same_location(&self, other: &StorageConfig) -> bool
pub fn same_location(&self, other: &StorageConfig) -> bool
Whether these settings reach the same location, ignoring display labels.
Sourcepub fn same_s3_bucket(&self, other: &StorageConfig) -> bool
pub fn same_s3_bucket(&self, other: &StorageConfig) -> bool
Whether both are S3 locations naming the same bucket, at one endpoint and region, whatever profile reaches it.
Sourcepub fn holds_one_store(&self) -> bool
pub fn holds_one_store(&self) -> bool
Whether every member reaches the whole location, so it holds one store, which the location marker at its root names (§20.3): a Dropbox shared folder, a OneDrive folder, or an S3 bucket. Nobody else reaches the Dropbox App folder, and a CloudKit store’s zone is its own.
Sourcepub fn oauth_access(&self) -> Option<OAuthAccess>
pub fn oauth_access(&self) -> Option<OAuthAccess>
Access required to open this location.
Sourcepub fn provider(&self) -> CloudProvider
pub fn provider(&self) -> CloudProvider
The provider of this location.
Sourcepub fn validate(&self) -> Result<(), StorageError>
pub fn validate(&self) -> Result<(), StorageError>
Reject missing location information before making a request.
Trait Implementations§
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for StorageConfig
impl Debug for StorageConfig
Source§impl<'de> Deserialize<'de> for StorageConfig
impl<'de> Deserialize<'de> for StorageConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<StorageConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<StorageConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for StorageConfig
impl PartialEq for StorageConfig
Source§impl Serialize for StorageConfig
impl Serialize for StorageConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Eq for StorageConfig
impl StructuralPartialEq for StorageConfig
Auto Trait Implementations§
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin for StorageConfig
impl UnsafeUnpin for StorageConfig
impl UnwindSafe for StorageConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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>
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>
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 more