Struct headers::ReferrerPolicy
source · [−]pub struct ReferrerPolicy(_);
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
sourceimpl 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
sourceimpl Clone for ReferrerPolicy
impl Clone for ReferrerPolicy
sourcefn clone(&self) -> ReferrerPolicy
fn clone(&self) -> ReferrerPolicy
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for ReferrerPolicy
impl Debug for ReferrerPolicy
sourceimpl Hash for ReferrerPolicy
impl Hash for ReferrerPolicy
sourceimpl Header for ReferrerPolicy
impl Header for ReferrerPolicy
sourcefn name() -> &'static HeaderName
fn name() -> &'static HeaderName
The name of this header.
sourceimpl PartialEq<ReferrerPolicy> for ReferrerPolicy
impl PartialEq<ReferrerPolicy> for ReferrerPolicy
sourcefn eq(&self, other: &ReferrerPolicy) -> bool
fn eq(&self, other: &ReferrerPolicy) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &ReferrerPolicy) -> bool
fn ne(&self, other: &ReferrerPolicy) -> bool
This method tests for !=
.
impl Eq for ReferrerPolicy
impl StructuralEq for ReferrerPolicy
impl StructuralPartialEq for ReferrerPolicy
Auto Trait Implementations
impl RefUnwindSafe for ReferrerPolicy
impl Send for ReferrerPolicy
impl Sync for ReferrerPolicy
impl Unpin for ReferrerPolicy
impl UnwindSafe for ReferrerPolicy
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more