pub enum ReferrerPolicy {
None,
NoReferrer,
NoReferrerWhenDowngrade,
Origin,
OriginWhenCrossOrigin,
UnsafeUrl,
SameOrigin,
StrictOrigin,
StrictOriginWhenCrossOrigin,
}
Expand description
Request’s referrer policy
Variants§
None
Corresponds to no referrer policy, causing a fallback to a referrer policy defined elsewhere, or in the case where no such higher-level policy is available, falling back to the default referrer policy
NoReferrer
Specifies that no referrer information is to be sent along with requests to any origin
NoReferrerWhenDowngrade
The “no-referrer-when-downgrade” policy sends a request’s full referrerURL stripped for use as a referrer for requests:
- whose referrerURL and current URL are both potentially trustworthy URLs, or
- whose referrerURL is a non-potentially trustworthy URL
Origin
Specifies that only the ASCII serialization of the request’s referrerURL is sent as referrer information when making both same-origin-referrer requests and cross-origin-referrer requests
OriginWhenCrossOrigin
Specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL is sent as referrer information when making cross-origin-referrer requests
UnsafeUrl
specifies that a request’s full referrerURL is sent along for both same-origin-referrer requests and cross-origin-referrer requests
SameOrigin
Specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests
StrictOrigin
The “strict-origin” policy sends the ASCII serialization of the origin of the referrerURL for requests:
- whose referrerURL and current URL are both potentially trustworthy URLs, or
- whose referrerURL is a non-potentially trustworthy URL.
StrictOriginWhenCrossOrigin
Specifies that a request’s full referrerURL is sent as referrer information when making same-origin-referrer requests, and only the ASCII serialization of the origin of the request’s referrerURL when making cross-origin-referrer requests:
- whose referrerURL and current URL are both potentially trustworthy URLs, or
- whose referrerURL is a non-potentially trustworthy URL
Trait Implementations§
source§impl Clone for ReferrerPolicy
impl Clone for ReferrerPolicy
source§fn clone(&self) -> ReferrerPolicy
fn clone(&self) -> ReferrerPolicy
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ReferrerPolicy
impl Debug for ReferrerPolicy
source§impl Default for ReferrerPolicy
impl Default for ReferrerPolicy
source§fn default() -> ReferrerPolicy
fn default() -> ReferrerPolicy
source§impl From<ReferrerPolicy> for ReferrerPolicy
impl From<ReferrerPolicy> for ReferrerPolicy
source§fn from(value: ReferrerPolicy) -> Self
fn from(value: ReferrerPolicy) -> Self
impl Copy 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request