Struct typed_headers::ContentCoding [−][src]
pub struct ContentCoding(_);
A content coding, used in the Accept-Encoding
and Content-Encoding
headers.
Methods
impl ContentCoding
[src]
impl ContentCoding
pub const BROTLI: ContentCoding
BROTLI: ContentCoding = ContentCoding(Inner::BROTLI)
The Brotli coding, as specified in RFC7932.
pub const GZIP: ContentCoding
GZIP: ContentCoding = ContentCoding(Inner::GZIP)
The Gzip coding, as specified in RFC7230.
pub const DEFLATE: ContentCoding
DEFLATE: ContentCoding = ContentCoding(Inner::DEFLATE)
The Deflate coding, as specified in RFC7230.
pub const COMPRESS: ContentCoding
COMPRESS: ContentCoding = ContentCoding(Inner::COMPRESS)
The Compress coding, as specified in RFC7230.
pub const IDENTITY: ContentCoding
IDENTITY: ContentCoding = ContentCoding(Inner::IDENTITY)
The identity coding.
pub const STAR: ContentCoding
STAR: ContentCoding = ContentCoding(Inner::STAR)
A wildcard, used in the Accept-Encoding
header to indicate that all codings are acceptable.
pub fn new(s: &str) -> Result<ContentCoding, Error>
[src]
pub fn new(s: &str) -> Result<ContentCoding, Error>
Constructs a new instance of this value from a string.
An error is returned if the string is not a valid token.
pub fn as_str(&self) -> &str
[src]
pub fn as_str(&self) -> &str
Returns the string representation of this token.
Trait Implementations
impl Debug for ContentCoding
[src]
impl Debug for ContentCoding
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for ContentCoding
[src]
impl Clone for ContentCoding
fn clone(&self) -> ContentCoding
[src]
fn clone(&self) -> ContentCoding
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialEq for ContentCoding
[src]
impl PartialEq for ContentCoding
fn eq(&self, other: &ContentCoding) -> bool
[src]
fn eq(&self, other: &ContentCoding) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ContentCoding) -> bool
[src]
fn ne(&self, other: &ContentCoding) -> bool
This method tests for !=
.
impl Eq for ContentCoding
[src]
impl Eq for ContentCoding
impl Display for ContentCoding
[src]
impl Display for ContentCoding
fn fmt(&self, fmt: &mut Formatter) -> Result
[src]
fn fmt(&self, fmt: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl FromStr for ContentCoding
[src]
impl FromStr for ContentCoding
type Err = Error
The associated error which can be returned from parsing.
fn from_str(s: &str) -> Result<ContentCoding, Error>
[src]
fn from_str(s: &str) -> Result<ContentCoding, Error>
Parses a string s
to return a value of this type. Read more
impl From<ContentCoding> for ContentEncoding
[src]
impl From<ContentCoding> for ContentEncoding
fn from(value: ContentCoding) -> ContentEncoding
[src]
fn from(value: ContentCoding) -> ContentEncoding
Performs the conversion.
Auto Trait Implementations
impl Send for ContentCoding
impl Send for ContentCoding
impl Sync for ContentCoding
impl Sync for ContentCoding