Struct actix_http::http::header::ContentLanguage [−][src]
pub struct ContentLanguage(pub Vec<QualityItem<LanguageTag>>);
Expand description
Content-Language
header, defined in
RFC7231
The Content-Language
header field describes the natural language(s)
of the intended audience for the representation. Note that this
might not be equivalent to all the languages used within the
representation.
ABNF
Content-Language = 1#language-tag
Example values
da
mi, en
Examples
use actix_http::Response; let mut builder = Response::Ok(); builder.set( ContentLanguage(vec![ qitem(langtag!(en)), ]) );
use actix_http::Response; let mut builder = Response::Ok(); builder.set( ContentLanguage(vec![ qitem(langtag!(da)), qitem(langtag!(en;;;GB)), ]) );
Tuple Fields
0: Vec<QualityItem<LanguageTag>>
Trait Implementations
type Target = Vec<QualityItem<LanguageTag>>
type Target = Vec<QualityItem<LanguageTag>>
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Returns the name of the header field
Parse a header
type Error = InvalidHeaderValue
type Error = InvalidHeaderValue
The type returned in the event of a conversion error.
Try to convert value to a Header value.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for ContentLanguage
impl Send for ContentLanguage
impl Sync for ContentLanguage
impl Unpin for ContentLanguage
impl UnwindSafe for ContentLanguage
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self