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: ReferrerPolicy
pub const NO_REFERRER: ReferrerPolicy
no-referrer
Sourcepub const NO_REFERRER_WHEN_DOWNGRADE: ReferrerPolicy
pub const NO_REFERRER_WHEN_DOWNGRADE: ReferrerPolicy
no-referrer-when-downgrade
Sourcepub const SAME_ORIGIN: ReferrerPolicy
pub const SAME_ORIGIN: ReferrerPolicy
same-origin
Sourcepub const ORIGIN: ReferrerPolicy
pub const ORIGIN: ReferrerPolicy
origin
Sourcepub const ORIGIN_WHEN_CROSS_ORIGIN: ReferrerPolicy
pub const ORIGIN_WHEN_CROSS_ORIGIN: ReferrerPolicy
origin-when-cross-origin
Sourcepub const UNSAFE_URL: ReferrerPolicy
pub const UNSAFE_URL: ReferrerPolicy
unsafe-url
Sourcepub const STRICT_ORIGIN: ReferrerPolicy
pub const STRICT_ORIGIN: ReferrerPolicy
strict-origin
Sourcepub const STRICT_ORIGIN_WHEN_CROSS_ORIGIN: ReferrerPolicy
pub const STRICT_ORIGIN_WHEN_CROSS_ORIGIN: ReferrerPolicy
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§fn name() -> &'static HeaderName
fn name() -> &'static HeaderName
The name of this header.
Source§fn decode<'i, I>(values: &mut I) -> Result<ReferrerPolicy, Error>where
I: Iterator<Item = &'i HeaderValue>,
fn decode<'i, I>(values: &mut I) -> Result<ReferrerPolicy, Error>where
I: Iterator<Item = &'i HeaderValue>,
Decode this type from an iterator of
HeaderValue
s.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§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<H> HeaderExt for Hwhere
H: Header + Sealed,
impl<H> HeaderExt for Hwhere
H: Header + Sealed,
Source§fn encode_to_value(&self) -> HeaderValue
fn encode_to_value(&self) -> HeaderValue
Encode this
Header
to HeaderValue
.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more