Enum hyper::header::AccessControlAllowOrigin [-] [+] [src]

pub enum AccessControlAllowOrigin {
    AllowStar,
    AllowOrigin(Url),
}

The Access-Control-Allow-Origin response header, part of CORS.

The Access-Control-Allow-Origin header indicates whether a resource can be shared based by returning the value of the Origin request header, "*", or "null" in the response.

Spec: www.w3.org/TR/cors/#access-control-allow-origin-response-header

Variants

AllowStar

Allow all origins

AllowOrigin

Allow one particular origin

Trait Implementations

impl Header for AccessControlAllowOrigin

fn header_name() -> &'static str

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

impl HeaderFormat for AccessControlAllowOrigin

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

impl Header for AccessControlAllowOrigin

fn header_name() -> &'static str

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

impl HeaderFormat for AccessControlAllowOrigin

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

impl Header for AccessControlAllowOrigin

fn header_name() -> &'static str

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

impl HeaderFormat for AccessControlAllowOrigin

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

Derived Implementations

impl Debug for AccessControlAllowOrigin

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

impl PartialEq for AccessControlAllowOrigin

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

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

impl Clone for AccessControlAllowOrigin

fn clone(&self) -> AccessControlAllowOrigin

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

impl Debug for AccessControlAllowOrigin

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

impl PartialEq for AccessControlAllowOrigin

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

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

impl Clone for AccessControlAllowOrigin

fn clone(&self) -> AccessControlAllowOrigin

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

impl Debug for AccessControlAllowOrigin

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

impl PartialEq for AccessControlAllowOrigin

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

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

impl Clone for AccessControlAllowOrigin

fn clone(&self) -> AccessControlAllowOrigin

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