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 ContentCodingpub 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) -> &strReturns the string representation of this token.
Trait Implementations
impl Debug for ContentCoding[src]
impl Debug for ContentCodingfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl Clone for ContentCoding[src]
impl Clone for ContentCodingfn clone(&self) -> ContentCoding[src]
fn clone(&self) -> ContentCodingReturns 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 ContentCodingfn eq(&self, other: &ContentCoding) -> bool[src]
fn eq(&self, other: &ContentCoding) -> boolThis 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) -> boolThis method tests for !=.
impl Eq for ContentCoding[src]
impl Eq for ContentCodingimpl Display for ContentCoding[src]
impl Display for ContentCodingfn fmt(&self, fmt: &mut Formatter) -> Result[src]
fn fmt(&self, fmt: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl FromStr for ContentCoding[src]
impl FromStr for ContentCodingtype 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 ContentEncodingfn from(value: ContentCoding) -> ContentEncoding[src]
fn from(value: ContentCoding) -> ContentEncodingPerforms the conversion.
Auto Trait Implementations
impl Send for ContentCoding
impl Send for ContentCodingimpl Sync for ContentCoding
impl Sync for ContentCoding