Struct viz::prelude::http::headers::AccessControlAllowOrigin [−][src]
pub struct AccessControlAllowOrigin(_);
Expand description
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;
Implementations
Access-Control-Allow-Origin: *
Access-Control-Allow-Origin: null
Trait Implementations
The name of this header.
pub fn decode<'i, I>(values: &mut I) -> Result<AccessControlAllowOrigin, Error> where
I: Iterator<Item = &'i HeaderValue>,
pub fn decode<'i, I>(values: &mut I) -> Result<AccessControlAllowOrigin, Error> where
I: Iterator<Item = &'i HeaderValue>,
Decode this type from an iterator of HeaderValue
s.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for AccessControlAllowOrigin
impl Send for AccessControlAllowOrigin
impl Sync for AccessControlAllowOrigin
impl Unpin for AccessControlAllowOrigin
impl UnwindSafe for AccessControlAllowOrigin
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more