pub struct StorageConfig {
pub enable_signer_v4_requests: bool,
pub enforce_path_access_style: bool,
pub default_object_acl: Option<ObjectCannedAcl>,
pub default_bucket_acl: Option<BucketCannedAcl>,
pub secret_access_key: String,
pub access_key_id: String,
pub app_name: Option<String>,
pub endpoint: Option<String>,
pub prefix: Option<String>,
pub region: Option<Region>,
pub bucket: String,
}Expand description
Represents the main configuration struct to configure a StorageService.
Fieldsยง
ยงenable_signer_v4_requests: boolWhether if the S3 storage backend should enable AWSv4 signatures when requests come in or not.
enforce_path_access_style: boolWhether if path access style should be enabled or not. This is recommended
to be set to true on MinIO instances.
- Enabled:
https://{host}/{bucket}/... - Disabled:
https://{bucket}.{host}/...
default_object_acl: Option<ObjectCannedAcl>Default ACL for all new objects.
default_bucket_acl: Option<BucketCannedAcl>Default ACL to use when a bucket doesnโt exist and #init was called from the backend.
secret_access_key: StringThe secret access key to authenticate with S3
access_key_id: StringThe access key ID to authenticate with S3
app_name: Option<String>Application name. This is set to remi-s3 if not provided.
endpoint: Option<String>AWS endpoint to reach.
prefix: Option<String>Prefix for querying and inserting new blobs into S3.
region: Option<Region>The region to use, this will default to us-east-1.
bucket: StringBucket to use for querying and inserting objects in.
Trait Implementationsยง
Sourceยงimpl Clone for StorageConfig
impl Clone for StorageConfig
Sourceยงfn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
Returns a duplicate of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSourceยงimpl Debug for StorageConfig
impl Debug for StorageConfig
Sourceยงimpl Default for StorageConfig
impl Default for StorageConfig
Sourceยงfn default() -> StorageConfig
fn default() -> StorageConfig
Returns the โdefault valueโ for a type. Read more
Sourceยงimpl<'de> Deserialize<'de> for StorageConfig
impl<'de> Deserialize<'de> for StorageConfig
Sourceยงfn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Sourceยงimpl From<StorageConfig> for Config
impl From<StorageConfig> for Config
Sourceยงfn from(config: StorageConfig) -> Config
fn from(config: StorageConfig) -> Config
Converts to this type from the input type.
Auto Trait Implementationsยง
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin 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
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> Instrument for T
impl<T> Instrument for T
Sourceยงfn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Sourceยง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.