Enum actix_http::header::ContentEncoding
source · [−]#[non_exhaustive]
pub enum ContentEncoding {
Auto,
Br,
Deflate,
Gzip,
Zstd,
Identity,
}
Expand description
Represents a supported content encoding.
Includes a commonly-used subset of media types appropriate for use as HTTP content encodings. See IANA HTTP Content Coding Registry.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
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
Zstd algorithm.
Identity
Indicates the identity function (i.e. no compression, nor modification).
Implementations
Trait Implementations
sourceimpl Clone for ContentEncoding
impl Clone for ContentEncoding
sourcefn clone(&self) -> ContentEncoding
fn clone(&self) -> ContentEncoding
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ContentEncoding
impl Debug for ContentEncoding
sourceimpl Default for ContentEncoding
impl Default for ContentEncoding
sourceimpl FromStr for ContentEncoding
impl FromStr for ContentEncoding
sourceimpl Header for ContentEncoding
impl Header for ContentEncoding
sourcefn name() -> HeaderName
fn name() -> HeaderName
Returns the name of the header field
sourcefn parse<T: HttpMessage>(msg: &T) -> Result<Self, ParseError>
fn parse<T: HttpMessage>(msg: &T) -> Result<Self, ParseError>
Parse a header
sourceimpl PartialEq<ContentEncoding> for ContentEncoding
impl PartialEq<ContentEncoding> for ContentEncoding
sourceimpl TryFrom<&str> for ContentEncoding
impl TryFrom<&str> for ContentEncoding
sourceimpl TryIntoHeaderValue for ContentEncoding
impl TryIntoHeaderValue for ContentEncoding
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
sourcefn try_into_value(self) -> Result<HeaderValue, Self::Error>
fn try_into_value(self) -> Result<HeaderValue, Self::Error>
Try to convert value to a HeaderValue.
impl Copy for ContentEncoding
impl StructuralPartialEq for ContentEncoding
Auto Trait Implementations
impl RefUnwindSafe for ContentEncoding
impl Send for ContentEncoding
impl Sync for ContentEncoding
impl Unpin for ContentEncoding
impl UnwindSafe for ContentEncoding
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more