#[non_exhaustive]pub struct BucketConfig {
pub name: String,
pub bucket: String,
pub region: Option<String>,
pub endpoint: String,
pub access_key: String,
pub secret_key: String,
pub public_url: Option<String>,
pub max_file_size: Option<String>,
pub path_style: bool,
}Expand description
Configuration for a single S3-compatible storage bucket.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.name: StringName used as the lookup key in Buckets. Ignored by Storage::new().
bucket: StringS3 bucket name.
region: Option<String>AWS region (e.g. us-east-1). None uses us-east-1 by default.
endpoint: StringS3-compatible endpoint URL.
access_key: StringAccess key ID.
secret_key: StringSecret access key.
public_url: Option<String>Base URL for public (non-signed) file URLs. None means Storage::url() will error.
max_file_size: Option<String>Maximum file size in human-readable format (e.g. "10mb"). None disables the limit.
path_style: boolUse path-style URLs (e.g. https://endpoint/bucket/key). Defaults to true.
Set to false for virtual-hosted-style (e.g. https://bucket.endpoint/key).
Trait Implementations§
Source§impl Clone for BucketConfig
impl Clone for BucketConfig
Source§fn clone(&self) -> BucketConfig
fn clone(&self) -> BucketConfig
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 BucketConfig
impl Debug for BucketConfig
Source§impl Default for BucketConfig
impl Default for BucketConfig
Source§impl<'de> Deserialize<'de> for BucketConfigwhere
BucketConfig: Default,
impl<'de> Deserialize<'de> for BucketConfigwhere
BucketConfig: Default,
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
Auto Trait Implementations§
impl Freeze for BucketConfig
impl RefUnwindSafe for BucketConfig
impl Send for BucketConfig
impl Sync for BucketConfig
impl Unpin for BucketConfig
impl UnsafeUnpin for BucketConfig
impl UnwindSafe for BucketConfig
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