Struct headers_ext::AccessControlAllowOrigin[][src]

pub struct AccessControlAllowOrigin(_);

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.

ABNF

Access-Control-Allow-Origin = "Access-Control-Allow-Origin" ":" origin-list-or-null | "*"

Example values

  • null
  • *
  • http://google.com/

Examples

use headers::AccessControlAllowOrigin;

let any_origin = AccessControlAllowOrigin::ANY;
let null_origin = AccessControlAllowOrigin::NULL;

Methods

impl AccessControlAllowOrigin
[src]

ANY: AccessControlAllowOrigin = AccessControlAllowOrigin(OriginOrAny::Any)

Access-Control-Allow-Origin: *

NULL: AccessControlAllowOrigin = AccessControlAllowOrigin(OriginOrAny::Origin(<Origin>::NULL))

Access-Control-Allow-Origin: null

Trait Implementations

impl Clone for AccessControlAllowOrigin
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for AccessControlAllowOrigin
[src]

Formats the value using the given formatter. Read more

impl PartialEq for AccessControlAllowOrigin
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl Eq for AccessControlAllowOrigin
[src]

impl Hash for AccessControlAllowOrigin
[src]

Feeds this value into the given [Hasher]. Read more

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations