pub struct ReferrerPolicy(/* private fields */);
Expand description
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;
Implementations§
Source§impl ReferrerPolicy
impl ReferrerPolicy
Sourcepub const NO_REFERRER: Self
pub const NO_REFERRER: Self
no-referrer
Sourcepub const NO_REFERRER_WHEN_DOWNGRADE: Self
pub const NO_REFERRER_WHEN_DOWNGRADE: Self
no-referrer-when-downgrade
Sourcepub const SAME_ORIGIN: Self
pub const SAME_ORIGIN: Self
same-origin
Sourcepub const ORIGIN_WHEN_CROSS_ORIGIN: Self
pub const ORIGIN_WHEN_CROSS_ORIGIN: Self
origin-when-cross-origin
Sourcepub const UNSAFE_URL: Self
pub const UNSAFE_URL: Self
unsafe-url
Sourcepub const STRICT_ORIGIN: Self
pub const STRICT_ORIGIN: Self
strict-origin
Sourcepub const STRICT_ORIGIN_WHEN_CROSS_ORIGIN: Self
pub const STRICT_ORIGIN_WHEN_CROSS_ORIGIN: Self
strict-origin-when-cross-origin
Trait Implementations§
Source§impl Clone for ReferrerPolicy
impl Clone for ReferrerPolicy
Source§fn clone(&self) -> ReferrerPolicy
fn clone(&self) -> ReferrerPolicy
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ReferrerPolicy
impl Debug for ReferrerPolicy
Source§impl Hash for ReferrerPolicy
impl Hash for ReferrerPolicy
Source§impl Header for ReferrerPolicy
impl Header for ReferrerPolicy
Source§impl PartialEq for ReferrerPolicy
impl PartialEq for ReferrerPolicy
impl Eq for ReferrerPolicy
impl StructuralPartialEq for ReferrerPolicy
Auto Trait Implementations§
impl Freeze for ReferrerPolicy
impl RefUnwindSafe for ReferrerPolicy
impl Send for ReferrerPolicy
impl Sync for ReferrerPolicy
impl Unpin for ReferrerPolicy
impl UnwindSafe for ReferrerPolicy
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more