pub enum ResolvedOrigin {
Http {
url: OriginUrl,
decompress: DecompressMode,
},
Fs {
path: PathBuf,
},
S3(ResolvedS3Config),
}Expand description
Resolved + validated origin backend selection (#437). Mirrors
crate::config::types::OriginConfig but carries pre-parsed types
for the variants that need them (HTTP base URL, S3 endpoint URL).
The resolution layer (crate::config::resolve_origin) is the
intended construction path — it’s the only producer the
runtime relies on, and the only path that runs the validators.
The fields on each variant are pub for consistency with the
other Resolved* types in this crate (see ResolvedCache,
ResolvedBlockchain, etc.); Rust visibility doesn’t enforce
the validator-only contract, but the runtime never bypasses it.
Variants§
Http
HTTP(S) origin. The base URL has already been parsed by
decdn_config_types::parse_origin_url at resolution time, so
invariants (http/https scheme, trailing-slash path, no
query/fragment) are type-enforced — they cannot be reconstructed
outside the parser.
Fields
decompress: DecompressModeHow to handle Content-Encoding on the HTTP origin response
(#312). Defaults to decdn_config_types::DecompressMode::Auto.
Fs
Local filesystem origin root. Directory-existence is validated when the runtime constructs the cache engine’s filesystem origin — config resolution carries the raw path so resolution stays filesystem-free and testable without real I/O.
S3(ResolvedS3Config)
S3-compatible origin. Field-shape validation (DNS-safe bucket
name, region non-empty, endpoint URL scheme, prefix shape) has
already run at resolution time and is encoded in the
ResolvedS3Config type.
Trait Implementations§
Source§impl Clone for ResolvedOrigin
impl Clone for ResolvedOrigin
Auto Trait Implementations§
impl Freeze for ResolvedOrigin
impl RefUnwindSafe for ResolvedOrigin
impl Send for ResolvedOrigin
impl Sync for ResolvedOrigin
impl Unpin for ResolvedOrigin
impl UnsafeUnpin for ResolvedOrigin
impl UnwindSafe for ResolvedOrigin
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