pub struct ServiceConfig {
pub backend: ServiceBackend,
pub public: bool,
pub root: Option<String>,
pub bucket: Option<String>,
pub region: Option<String>,
pub endpoint: Option<String>,
pub access_key_id: Option<String>,
pub secret_access_key: Option<String>,
pub container: Option<String>,
pub account: Option<String>,
pub access_key: Option<String>,
pub options: HashMap<String, Value>,
}Expand description
One named service’s settings. Fields are shared across backends; each backend reads the ones it needs.
Fields§
§backend: ServiceBackendBackend kind. YAML key is type.
public: boolWhether objects are publicly readable (affects URL generation).
root: Option<String>Disk: root directory (default storage).
bucket: Option<String>S3/R2: bucket name.
region: Option<String>S3/R2: region (R2 uses auto).
endpoint: Option<String>S3/R2: custom endpoint (required for R2 and S3-compatible stores).
access_key_id: Option<String>S3/R2: access key id (else read from the environment).
secret_access_key: Option<String>S3/R2: secret access key (else read from the environment).
container: Option<String>Azure: container name.
account: Option<String>Azure: storage account name.
access_key: Option<String>Azure: account access key (else read from the environment).
options: HashMap<String, Value>Any extra keys not matched above — available to custom adapters (e.g. a
token or api_url for an external service).
Implementations§
Trait Implementations§
Source§impl Clone for ServiceConfig
impl Clone for ServiceConfig
Source§fn clone(&self) -> ServiceConfig
fn clone(&self) -> ServiceConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ServiceConfig
impl Debug for ServiceConfig
Source§impl Default for ServiceConfig
impl Default for ServiceConfig
Source§fn default() -> ServiceConfig
fn default() -> ServiceConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ServiceConfig
impl<'de> Deserialize<'de> for ServiceConfig
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 ServiceConfig
impl RefUnwindSafe for ServiceConfig
impl Send for ServiceConfig
impl Sync for ServiceConfig
impl Unpin for ServiceConfig
impl UnsafeUnpin for ServiceConfig
impl UnwindSafe for ServiceConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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 more