Struct http_stub::header::AccessControlAllowMethods [] [src]

pub struct AccessControlAllowMethods(pub Vec<Method>);

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

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

ABNF

Access-Control-Allow-Methods: "Access-Control-Allow-Methods" ":" #Method

Example values

Examples

use hyper::header::{Headers, AccessControlAllowMethods};
use hyper::method::Method;

let mut headers = Headers::new();
headers.set(
    AccessControlAllowMethods(vec![Method::Get])
);
use hyper::header::{Headers, AccessControlAllowMethods};
use hyper::method::Method;

let mut headers = Headers::new();
headers.set(
    AccessControlAllowMethods(vec![
        Method::Get,
        Method::Post,
        Method::Patch,
        Method::Extension("COPY".to_owned()),
    ])
);

Trait Implementations

impl Display for AccessControlAllowMethods

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

impl HeaderFormat for AccessControlAllowMethods

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

impl Header for AccessControlAllowMethods

fn header_name() -> &'static str

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

impl DerefMut for AccessControlAllowMethods

fn deref_mut(&mut self) -> &mut Vec<Method>

impl Deref for AccessControlAllowMethods

type Target = Vec<Method>

fn deref(&self) -> &Vec<Method>

Derived Implementations

impl Clone for AccessControlAllowMethods

fn clone(&self) -> AccessControlAllowMethods

impl Debug for AccessControlAllowMethods

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

impl PartialEq<AccessControlAllowMethods> for AccessControlAllowMethods

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

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