pub enum ContentEncoding {
Auto,
Br,
Deflate,
Gzip,
Zstd,
Identity,
}Expand description
Represents supported types of content encodings
Variants§
Auto
Automatically select encoding based on encoding negotiation
Br
A format using the Brotli algorithm
Deflate
A format using the zlib structure with deflate algorithm
Gzip
Gzip algorithm
Zstd
A format using the Zstandard algorithm
Identity
Indicates the identity function (i.e. no compression, nor modification)
Implementations§
Trait Implementations§
Source§impl Clone for ContentEncoding
impl Clone for ContentEncoding
Source§fn clone(&self) -> ContentEncoding
fn clone(&self) -> ContentEncoding
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ContentEncoding
Source§impl Debug for ContentEncoding
impl Debug for ContentEncoding
impl Eq for ContentEncoding
Source§impl FromStr for ContentEncoding
impl FromStr for ContentEncoding
Source§fn from_str(s: &str) -> Result<ContentEncoding, InvalidContentEncoding>
fn from_str(s: &str) -> Result<ContentEncoding, InvalidContentEncoding>
Parse a content-coding name.
Accepts br, gzip (or x-gzip), deflate, zstd and identity,
ignoring ASCII case and surrounding whitespace. Unknown or empty names
return an error, use .unwrap_or(ContentEncoding::Identity) to fall
back to no compression.
Source§type Err = InvalidContentEncoding
type Err = InvalidContentEncoding
The associated error which can be returned from parsing.
Source§impl PartialEq for ContentEncoding
impl PartialEq for ContentEncoding
impl StructuralPartialEq for ContentEncoding
Auto Trait Implementations§
impl Freeze for ContentEncoding
impl RefUnwindSafe for ContentEncoding
impl Send for ContentEncoding
impl Sync for ContentEncoding
impl Unpin for ContentEncoding
impl UnsafeUnpin for ContentEncoding
impl UnwindSafe for ContentEncoding
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.