Struct headers_ext::ReferrerPolicy[][src]

pub struct ReferrerPolicy(_);

Referrer-Policy header, part of Referrer Policy

The Referrer-Policy HTTP header specifies the referrer policy that the user agent applies when determining what referrer information should be included with requests made, and with browsing contexts created from the context of the protected resource.

ABNF

Referrer-Policy: 1#policy-token
policy-token   = "no-referrer" / "no-referrer-when-downgrade"
                 / "same-origin" / "origin"
                 / "origin-when-cross-origin" / "unsafe-url"

Example values

  • no-referrer

Example

use headers::ReferrerPolicy;

let rp = ReferrerPolicy::NO_REFERRER;

Methods

impl ReferrerPolicy
[src]

NO_REFERRER: Self = ReferrerPolicy(Policy::NoReferrer)

no-referrer

NO_REFERRER_WHEN_DOWNGRADE: Self = ReferrerPolicy(Policy::NoReferrerWhenDowngrade)

no-referrer-when-downgrade

SAME_ORIGIN: Self = ReferrerPolicy(Policy::SameOrigin)

same-origin

ORIGIN: Self = ReferrerPolicy(Policy::Origin)

origin

ORIGIN_WHEN_CROSS_ORIGIN: Self = ReferrerPolicy(Policy::OriginWhenCrossOrigin)

origin-when-cross-origin

UNSAFE_URL: Self = ReferrerPolicy(Policy::UnsafeUrl)

unsafe-url

STRICT_ORIGIN: Self = ReferrerPolicy(Policy::StrictOrigin)

strict-origin

STRICT_ORIGIN_WHEN_CROSS_ORIGIN: Self = ReferrerPolicy(Policy::StrictOriginWhenCrossOrigin)

strict-origin-when-cross-origin

Trait Implementations

impl Clone for ReferrerPolicy
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for ReferrerPolicy
[src]

Formats the value using the given formatter. Read more

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

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