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]

NULL: Origin = Origin(OriginOrNull::Null)

The literal null Origin header.

Checks if Origin is null.

Trait Implementations

impl Clone for Origin
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Origin
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Origin
[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 Origin
[src]

impl Hash for Origin
[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

impl Send for Origin

impl Sync for Origin