pub enum Encoding {
Identity,
Deflate,
Gzip,
Brotli,
Zstd,
}Expand description
This enum’s variants are ordered from least to most preferred.
Variants§
Implementations§
Source§impl Encoding
impl Encoding
pub fn to_file_extension(self) -> Option<&'static OsStr>
pub fn maybe_from_content_encoding_header( headers: &HeaderMap, supported_encoding: impl SupportedEncodings, ) -> Option<Self>
pub fn from_content_encoding_header( headers: &HeaderMap, supported_encoding: impl SupportedEncodings, ) -> Self
pub fn maybe_from_accept_encoding_headers( headers: &HeaderMap, supported_encoding: impl SupportedEncodings, ) -> Option<Self>
pub fn from_accept_encoding_headers( headers: &HeaderMap, supported_encoding: impl SupportedEncodings, ) -> Self
pub fn maybe_preferred_encoding( accepted_encodings: impl Iterator<Item = QualityValue<Encoding>>, ) -> Option<Self>
Trait Implementations§
Source§impl From<Encoding> for HeaderValue
impl From<Encoding> for HeaderValue
Source§impl Ord for Encoding
impl Ord for Encoding
Source§impl PartialOrd for Encoding
impl PartialOrd for Encoding
impl Copy for Encoding
impl Eq for Encoding
impl StructuralPartialEq for Encoding
Auto Trait Implementations§
impl Freeze for Encoding
impl RefUnwindSafe for Encoding
impl Send for Encoding
impl Sync for Encoding
impl Unpin for Encoding
impl UnwindSafe for Encoding
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,
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