Struct headers::common::referrer_policy::ReferrerPolicy
source · pub struct ReferrerPolicy(Policy);
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;
Tuple Fields§
§0: Policy
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)