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 POSTs 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 Originpub 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) -> boolChecks if Origin is null.
Trait Implementations
impl Clone for Origin[src]
impl Clone for Originfn clone(&self) -> Origin[src]
fn clone(&self) -> OriginReturns 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 Originfn fmt(&self, f: &mut Formatter) -> Result[src]
fn fmt(&self, f: &mut Formatter) -> ResultFormats the value using the given formatter. Read more
impl PartialEq for Origin[src]
impl PartialEq for Originfn eq(&self, other: &Origin) -> bool[src]
fn eq(&self, other: &Origin) -> boolThis 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) -> boolThis method tests for !=.
impl Eq for Origin[src]
impl Eq for Originimpl Hash for Origin[src]
impl Hash for Origin