Struct headers_ext::Origin [−][src]
pub struct Origin(_);
The Origin
header.
The Origin
header is a version of the Referer
header that is used for all HTTP fetches and POST
s whose CORS flag is set.
This header is often used to inform recipients of the security context of where the request was initiated.
Following the spec, https://fetch.spec.whatwg.org/#origin-header, the value of this header is composed of a String (scheme), Host (host/port)
Examples
use headers::Origin; let origin = Origin::NULL;
Methods
impl Origin
[src]
impl Origin
pub const NULL: Origin
NULL: Origin = Origin(OriginOrNull::Null)
The literal null
Origin header.
pub fn is_null(&self) -> bool
[src]
pub fn is_null(&self) -> bool
Checks if Origin
is null
.
Trait Implementations
impl Clone for Origin
[src]
impl Clone for Origin
fn clone(&self) -> Origin
[src]
fn clone(&self) -> Origin
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 Origin
[src]
impl Debug for Origin
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 Origin
[src]
impl PartialEq for Origin
fn eq(&self, other: &Origin) -> bool
[src]
fn eq(&self, other: &Origin) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Origin) -> bool
[src]
fn ne(&self, other: &Origin) -> bool
This method tests for !=
.
impl Eq for Origin
[src]
impl Eq for Origin
impl Hash for Origin
[src]
impl Hash for Origin