[−][src]Struct requiem_http::http::header::AcceptCharset
Accept-Charset
header, defined in
RFC7231
The Accept-Charset
header field can be sent by a user agent to
indicate what charsets are acceptable in textual response content.
This field allows user agents capable of understanding more
comprehensive or special-purpose charsets to signal that capability
to an origin server that is capable of representing information in
those charsets.
ABNF
Accept-Charset = 1#( ( charset / "*" ) [ weight ] )
Example values
iso-8859-5, unicode-1-1;q=0.8
Examples
use requiem_http::Response; use requiem_http::http::header::{AcceptCharset, Charset, qitem}; let mut builder = Response::Ok(); builder.set( AcceptCharset(vec![qitem(Charset::Us_Ascii)]) );
use requiem_http::Response; use requiem_http::http::header::{AcceptCharset, Charset, q, QualityItem}; let mut builder = Response::Ok(); builder.set( AcceptCharset(vec![ QualityItem::new(Charset::Us_Ascii, q(900)), QualityItem::new(Charset::Iso_8859_10, q(200)), ]) );
use requiem_http::Response; use requiem_http::http::header::{AcceptCharset, Charset, qitem}; let mut builder = Response::Ok(); builder.set( AcceptCharset(vec![qitem(Charset::Ext("utf-8".to_owned()))]) );
Trait Implementations
impl Clone for AcceptCharset
[src]
fn clone(&self) -> AcceptCharset
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for AcceptCharset
[src]
impl Deref for AcceptCharset
[src]
type Target = Vec<QualityItem<Charset>>
The resulting type after dereferencing.
fn deref(&self) -> &Vec<QualityItem<Charset>>
[src]
impl DerefMut for AcceptCharset
[src]
impl Display for AcceptCharset
[src]
impl Header for AcceptCharset
[src]
fn name() -> HeaderName
[src]
fn parse<T>(msg: &T) -> Result<Self, ParseError> where
T: HttpMessage,
[src]
T: HttpMessage,
impl IntoHeaderValue for AcceptCharset
[src]
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
fn try_into(self) -> Result<HeaderValue, Self::Error>
[src]
impl PartialEq<AcceptCharset> for AcceptCharset
[src]
fn eq(&self, other: &AcceptCharset) -> bool
[src]
fn ne(&self, other: &AcceptCharset) -> bool
[src]
impl StructuralPartialEq for AcceptCharset
[src]
Auto Trait Implementations
impl RefUnwindSafe for AcceptCharset
impl Send for AcceptCharset
impl Sync for AcceptCharset
impl Unpin for AcceptCharset
impl UnwindSafe for AcceptCharset
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,