Enum actix_web::http::ContentEncoding [−][src]
#[non_exhaustive]
pub enum ContentEncoding {
Auto,
Br,
Deflate,
Gzip,
Zstd,
Identity,
}
Expand description
Represents a supported content encoding.
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
Identity
Indicates the identity function (i.e. no compression, nor modification).
Implementations
Trait Implementations
Returns the “default value” for a type. Read more
Returns the name of the header field
Parse a header
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
pub fn try_into_value(
self
) -> Result<HeaderValue, <ContentEncoding as IntoHeaderValue>::Error>
pub fn try_into_value(
self
) -> Result<HeaderValue, <ContentEncoding as IntoHeaderValue>::Error>
Try to convert value to a HeaderValue.
type Error = ContentEncodingParseError
type Error = ContentEncodingParseError
The type returned in the event of a conversion error.
pub fn try_from(
val: &str
) -> Result<ContentEncoding, <ContentEncoding as TryFrom<&'_ str>>::Error>
pub fn try_from(
val: &str
) -> Result<ContentEncoding, <ContentEncoding as TryFrom<&'_ str>>::Error>
Performs the conversion.
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
Mutably borrows from an owned value. Read more
type Error = <T as IntoHeaderValue>::Error
pub fn try_into_header_pair(
self
) -> Result<(HeaderName, HeaderValue), <T as IntoHeaderPair>::Error>
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more