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]
impl ReferrerPolicy
pub const NO_REFERRER: Self
NO_REFERRER: Self = ReferrerPolicy(Policy::NoReferrer)
no-referrer
pub const NO_REFERRER_WHEN_DOWNGRADE: Self
NO_REFERRER_WHEN_DOWNGRADE: Self = ReferrerPolicy(Policy::NoReferrerWhenDowngrade)
no-referrer-when-downgrade
pub const SAME_ORIGIN: Self
SAME_ORIGIN: Self = ReferrerPolicy(Policy::SameOrigin)
same-origin
pub const ORIGIN: Self
ORIGIN: Self = ReferrerPolicy(Policy::Origin)
origin
pub const ORIGIN_WHEN_CROSS_ORIGIN: Self
ORIGIN_WHEN_CROSS_ORIGIN: Self = ReferrerPolicy(Policy::OriginWhenCrossOrigin)
origin-when-cross-origin
pub const UNSAFE_URL: Self
UNSAFE_URL: Self = ReferrerPolicy(Policy::UnsafeUrl)
unsafe-url
pub const STRICT_ORIGIN: Self
STRICT_ORIGIN: Self = ReferrerPolicy(Policy::StrictOrigin)
strict-origin
pub const STRICT_ORIGIN_WHEN_CROSS_ORIGIN: Self
STRICT_ORIGIN_WHEN_CROSS_ORIGIN: Self = ReferrerPolicy(Policy::StrictOriginWhenCrossOrigin)
strict-origin-when-cross-origin
Trait Implementations
impl Clone for ReferrerPolicy
[src]
impl Clone for ReferrerPolicy
fn clone(&self) -> ReferrerPolicy
[src]
fn clone(&self) -> ReferrerPolicy
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 ReferrerPolicy
[src]
impl Debug for ReferrerPolicy
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 ReferrerPolicy
[src]
impl PartialEq for ReferrerPolicy
fn eq(&self, other: &ReferrerPolicy) -> bool
[src]
fn eq(&self, other: &ReferrerPolicy) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ReferrerPolicy) -> bool
[src]
fn ne(&self, other: &ReferrerPolicy) -> bool
This method tests for !=
.
impl Eq for ReferrerPolicy
[src]
impl Eq for ReferrerPolicy
impl Hash for ReferrerPolicy
[src]
impl Hash for ReferrerPolicy
Auto Trait Implementations
impl Send for ReferrerPolicy
impl Send for ReferrerPolicy
impl Sync for ReferrerPolicy
impl Sync for ReferrerPolicy