pub enum Coding {
Gzip,
Deflate,
Brotli,
Zstd,
}Expand description
A content coding Faith can decode. Wire tokens: gzip, deflate, br, zstd.
deflate is the zlib-wrapped form (RFC 1950), matching what reqwest and every
other mainstream client decode it as.
Variants§
Implementations§
Source§impl Coding
impl Coding
Sourcepub fn from_option(value: &str) -> Option<Self>
pub fn from_option(value: &str) -> Option<Self>
Match the compress option’s value, which names a coding by its wire token.
Unlike Self::from_token, which reads a token off the wire and so takes it as
loosely as HTTP writes it, this matches the four documented tokens exactly: the
option is an API surface, and an unrecognised value is refused rather than
guessed at.
Sourcepub fn from_token(token: &str) -> Option<Self>
pub fn from_token(token: &str) -> Option<Self>
Match a single content-coding token, case-insensitively. None for
identity, an unknown coding, or one this cannot decode.
Trait Implementations§
impl Copy for Coding
impl Eq for Coding
impl StructuralPartialEq for Coding
Auto Trait Implementations§
impl Freeze for Coding
impl RefUnwindSafe for Coding
impl Send for Coding
impl Sync for Coding
impl Unpin for Coding
impl UnsafeUnpin for Coding
impl UnwindSafe for Coding
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