fn character_encoding(&self) -> Result<EncodingRef, HttpError> {
        match self.content_type() {
            Some(content_type) => match mime_charset(content_type) {
                Some(charset) => {
                    match encoding::label::encoding_from_whatwg_label(charset.as_str()) {
                        None => Err(HttpError::InvalidCharset { charset }),
                        Some(enc) => Ok(enc),
                    }
                }
                None => Ok(encoding::all::UTF_8),
            },
            None => Ok(encoding::all::UTF_8),
        }
    }
/// Returns character encoding of the HTTP response.
Returns character encoding of the HTTP response.
Returns character encoding of the HTTP response .
fn character_encoding(&self) -> Result<EncodingRef, HttpError> {
        match self.content_type() {
            Some(content_type) => match mime_charset(content_type) {
                Some(charset) => {
                    match encoding::label::encoding_from_whatwg_label(charset.as_str()) {
                        None => Err(HttpError::InvalidCharset { charset }),
                        Some(enc) => Ok(enc),
                    }
                }
                None => Ok(encoding::all::UTF_8),
            },
            None => Ok(encoding::all::UTF_8),
        }
    }
fn character_encoding ( & self ) -> Result < EncodingRef , HttpError > { match self . content_type ( ) { Some ( content_type ) => match mime_charset ( content_type ) { Some ( charset ) => { match encoding :: label :: encoding_from_whatwg_label ( charset . as_str ( ) ) { None => Err ( HttpError :: InvalidCharset { charset } ) , Some ( enc ) => Ok ( enc ) , } } None => Ok ( encoding :: all :: UTF_8 ) , } , None => Ok ( encoding :: all :: UTF_8 ) , } }
Returns character encoding of the HTTP response.
Returns character encoding of the HTTP response .
&self