pub enum DecompressMode {
Auto,
Strict,
}Expand description
How the HTTP origin handles Content-Encoding on the response.
bool was the original config knob, but the two states have richer
semantics than “on / off” — Strict is not “no decompression”, it
is “I will refuse anything other than identity”. Using a typed enum
keeps that distinction visible at every call site (config, runtime,
fetch path) and on operator-facing config files.
The TOML representation uses lowercase tag names: decompress = "auto"
or decompress = "strict".
Variants§
Auto
Decode gzip / zstd bodies transparently; identity passes
through; unknown encodings raise OriginError::UnsupportedEncoding.
This is the default — most object stores serve compressed bodies
and the BLAKE3 verify in the cache engine runs over the canonical
(decompressed) form, so pass-through would always fail
verification.
Strict
Reject any non-identity Content-Encoding. The origin must serve
canonical bytes; gzip / zstd / unknown encodings all return
OriginError::UnsupportedEncoding before any decode runs.
Useful only for origins that pre-canonicalise (e.g. an internal
pre-warmed mirror).
Trait Implementations§
Source§impl Clone for DecompressMode
impl Clone for DecompressMode
Source§fn clone(&self) -> DecompressMode
fn clone(&self) -> DecompressMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DecompressMode
Source§impl Debug for DecompressMode
impl Debug for DecompressMode
Source§impl Default for DecompressMode
impl Default for DecompressMode
Source§fn default() -> DecompressMode
fn default() -> DecompressMode
Source§impl<'de> Deserialize<'de> for DecompressMode
impl<'de> Deserialize<'de> for DecompressMode
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DecompressMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DecompressMode, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
impl Eq for DecompressMode
Source§impl PartialEq for DecompressMode
impl PartialEq for DecompressMode
Source§impl Serialize for DecompressMode
impl Serialize for DecompressMode
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl StructuralPartialEq for DecompressMode
Auto Trait Implementations§
impl Freeze for DecompressMode
impl RefUnwindSafe for DecompressMode
impl Send for DecompressMode
impl Sync for DecompressMode
impl Unpin for DecompressMode
impl UnsafeUnpin for DecompressMode
impl UnwindSafe for DecompressMode
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
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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