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]
impl AccessControlAllowOrigin
pub const ANY: AccessControlAllowOrigin
ANY: AccessControlAllowOrigin = AccessControlAllowOrigin(OriginOrAny::Any)
Access-Control-Allow-Origin: *
pub const NULL: AccessControlAllowOrigin
NULL: AccessControlAllowOrigin = AccessControlAllowOrigin(OriginOrAny::Origin(<Origin>::NULL))
Access-Control-Allow-Origin: null
pub fn origin(&self) -> Option<&Origin>
[src]
pub fn origin(&self) -> Option<&Origin>
Returns the origin if there's one specified.
Trait Implementations
impl Clone for AccessControlAllowOrigin
[src]
impl Clone for AccessControlAllowOrigin
fn clone(&self) -> AccessControlAllowOrigin
[src]
fn clone(&self) -> AccessControlAllowOrigin
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for AccessControlAllowOrigin
[src]
impl Debug for AccessControlAllowOrigin
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for AccessControlAllowOrigin
[src]
impl PartialEq for AccessControlAllowOrigin
fn eq(&self, other: &AccessControlAllowOrigin) -> bool
[src]
fn eq(&self, other: &AccessControlAllowOrigin) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &AccessControlAllowOrigin) -> bool
[src]
fn ne(&self, other: &AccessControlAllowOrigin) -> bool
This method tests for !=
.
impl Eq for AccessControlAllowOrigin
[src]
impl Eq for AccessControlAllowOrigin
impl Hash for AccessControlAllowOrigin
[src]
impl Hash for AccessControlAllowOrigin
Auto Trait Implementations
impl Send for AccessControlAllowOrigin
impl Send for AccessControlAllowOrigin
impl Sync for AccessControlAllowOrigin
impl Sync for AccessControlAllowOrigin