Struct http_stub::header::AccessControlAllowHeaders [] [src]

pub struct AccessControlAllowHeaders(pub Vec<UniCase<String>>);

Access-Control-Allow-Headers header, part of CORS

The Access-Control-Allow-Headers header indicates, as part of the response to a preflight request, which header field names can be used during the actual request.

ABNF

Access-Control-Allow-Headers: "Access-Control-Allow-Headers" ":" #field-name

Example values

Examples

// extern crate unicase;

use hyper::header::{Headers, AccessControlAllowHeaders};
use unicase::UniCase;

let mut headers = Headers::new();
headers.set(
    AccessControlAllowHeaders(vec![UniCase("date".to_owned())])
);
// extern crate unicase;

use hyper::header::{Headers, AccessControlAllowHeaders};
use unicase::UniCase;

let mut headers = Headers::new();
headers.set(
    AccessControlAllowHeaders(vec![
        UniCase("accept-language".to_owned()),
        UniCase("date".to_owned()),
    ])
);

Trait Implementations

impl DerefMut for AccessControlAllowHeaders

fn deref_mut(&mut self) -> &mut Vec<UniCase<String>>

impl Deref for AccessControlAllowHeaders

type Target = Vec<UniCase<String>>

fn deref(&self) -> &Vec<UniCase<String>>

impl Display for AccessControlAllowHeaders

fn fmt(&self, f: &mut Formatter) -> Result<(), Error>

impl HeaderFormat for AccessControlAllowHeaders

fn fmt_header(&self, f: &mut Formatter) -> Result<(), Error>

impl Header for AccessControlAllowHeaders

fn header_name() -> &'static str

fn parse_header(raw: &[Vec<u8>]) -> Result<AccessControlAllowHeaders, Error>

Derived Implementations

impl Debug for AccessControlAllowHeaders

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

impl PartialEq<AccessControlAllowHeaders> for AccessControlAllowHeaders

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

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

impl Clone for AccessControlAllowHeaders

fn clone(&self) -> AccessControlAllowHeaders