pub struct ResolvedS3Config {
pub bucket: String,
pub region: String,
pub endpoint_url: Option<OriginUrl>,
pub path_style: bool,
pub prefix: String,
pub credentials: Option<ResolvedS3Credentials>,
pub decompress: DecompressMode,
}Expand description
Validated runtime form of an S3 origin (#437). The intended
construction path is crate::config::resolve_s3_origin, which
runs the validators and lifts the wire-form
crate::config::types::S3OriginConfig into this resolved form
with pre-parsed types (notably endpoint_url: Option<OriginUrl>).
Default is intentionally not derived. The fields are pub for
consistency with the other Resolved* types in this crate, so
in-crate construction with field-init is technically possible —
the runtime simply doesn’t do that. Pattern of intent rather
than visibility-enforced invariant.
Resolved-vs-wire-form differences:
endpoint_urlisOption<OriginUrl>(parsed) instead ofOption<String>, so the S3 backend cannot accidentally pass an un-normalized URL to the SDK and produceSigV4mismatches between, say,http://minio:9000andhttp://minio:9000/.path_styleisbool(collapsed fromOption<bool>), withNonemapped to the SDK default (virtual-hosted-style = false).prefixis aStringwith the trailing-slash auto-append already applied — the runtime never sees the raw pre-normalised form.
Fields§
§bucket: StringBucket name. Validated DNS-safe at construction time.
region: StringAWS region, validated non-empty at construction time.
endpoint_url: Option<OriginUrl>Custom endpoint URL for non-AWS S3-compatible providers (R2,
B2, MinIO). Parsed and trailing-slash-normalized.
path_style: boolWhether to use path-style addressing. false (the SDK
default) selects virtual-hosted-style addressing.
prefix: StringOptional key prefix prepended to every fetched object.
Trailing-slash-normalized so the runtime can build keys via
format!("{prefix}{shard}/{hex}") without re-checking the
trailing slash.
credentials: Option<ResolvedS3Credentials>Resolved credential source.
decompress: DecompressModeHow to handle Content-Encoding on the S3 origin response
(#804). Defaults to decdn_config_types::DecompressMode::Auto.
Trait Implementations§
Source§impl Clone for ResolvedS3Config
impl Clone for ResolvedS3Config
Auto Trait Implementations§
impl Freeze for ResolvedS3Config
impl RefUnwindSafe for ResolvedS3Config
impl Send for ResolvedS3Config
impl Sync for ResolvedS3Config
impl Unpin for ResolvedS3Config
impl UnsafeUnpin for ResolvedS3Config
impl UnwindSafe for ResolvedS3Config
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> ⓘ
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