Struct hyper::header::common::accept::Accept [-]  [+] [src]

pub struct Accept(pub Vec<QualityItem<Mime>>);

The Accept header.

The Accept header is used to tell a server which content-types the client is capable of using. It can be a comma-separated list of Mimes, and the priority can be indicated with a q parameter.

Example:

use hyper::mime::Mime;
use hyper::mime::TopLevel::Text;
use hyper::mime::SubLevel::{Html, Xml};
headers.set(Accept(vec![
    qitem(Mime(Text, Html, vec![])),
    qitem(Mime(Text, Xml, vec![])) ]));

Trait Implementations

impl Deref for Accept

type Target = Vec<QualityItem<Mime>>

fn deref<'a>(&'a self) -> &'a Vec<QualityItem<Mime>>

impl DerefMut for Accept

fn deref_mut<'a>(&'a mut self) -> &'a mut Vec<QualityItem<Mime>>

impl Header for Accept

fn header_name(_: Option<Accept>) -> &'static str

fn parse_header(raw: &[Vec<u8>]) -> Option<Accept>

impl HeaderFormat for Accept

fn fmt_header(&self, fmt: &mut Formatter) -> Result

Derived Implementations

impl Show for Accept

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl PartialEq for Accept

fn eq(&self, __arg_0: &Accept) -> bool

fn ne(&self, __arg_0: &Accept) -> bool

impl Clone for Accept

fn clone(&self) -> Accept

fn clone_from(&mut self, source: &Self)