Enum ajars_actix_web::actix_web::http::ContentEncoding [−]
pub enum ContentEncoding {
Auto,
Br,
Deflate,
Gzip,
Zstd,
Identity,
}
Expand description
Represents a supported content encoding.
Variants
Automatically select encoding based on encoding negotiation.
A format using the Brotli algorithm.
A format using the zlib structure with deflate algorithm.
Gzip algorithm.
Indicates the identity function (i.e. no compression, nor modification).
Implementations
impl ContentEncoding
impl ContentEncoding
Trait Implementations
impl Clone for ContentEncoding
impl Clone for ContentEncoding
pub fn clone(&self) -> ContentEncoding
pub fn clone(&self) -> ContentEncoding
Returns a copy of the value. Read more
Performs copy-assignment from source
. Read more
impl Debug for ContentEncoding
impl Debug for ContentEncoding
impl Default for ContentEncoding
impl Default for ContentEncoding
pub fn default() -> ContentEncoding
pub fn default() -> ContentEncoding
Returns the “default value” for a type. Read more
impl<'_> From<&'_ str> for ContentEncoding
impl<'_> From<&'_ str> for ContentEncoding
pub fn from(val: &str) -> ContentEncoding
pub fn from(val: &str) -> ContentEncoding
Performs the conversion.
impl FromStr for ContentEncoding
impl FromStr for ContentEncoding
type Err = Infallible
type Err = Infallible
The associated error which can be returned from parsing.
pub fn from_str(
val: &str
) -> Result<ContentEncoding, <ContentEncoding as FromStr>::Err>
pub fn from_str(
val: &str
) -> Result<ContentEncoding, <ContentEncoding as FromStr>::Err>
Parses a string s
to return a value of this type. Read more
impl Header for ContentEncoding
impl Header for ContentEncoding
pub fn name() -> HeaderName
pub fn name() -> HeaderName
Returns the name of the header field
pub fn parse<T>(msg: &T) -> Result<ContentEncoding, ParseError> where
T: HttpMessage,
pub fn parse<T>(msg: &T) -> Result<ContentEncoding, ParseError> where
T: HttpMessage,
Parse a header
impl IntoHeaderValue for ContentEncoding
impl IntoHeaderValue for ContentEncoding
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.
impl PartialEq<ContentEncoding> for ContentEncoding
impl PartialEq<ContentEncoding> for ContentEncoding
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
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
impl<T> IntoHeaderPair for T where
T: Header,
impl<T> IntoHeaderPair for T where
T: Header,
type Error = <T as IntoHeaderValue>::Error
pub fn try_into_header_pair(
self
) -> Result<(HeaderName, HeaderValue), <T as IntoHeaderPair>::Error>
type Output = T
type Output = T
Should always be Self