Struct poem::web::headers::ReferrerPolicy
source · 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
source§fn 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 ==
.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<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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<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<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> TowerCompatExt for T
impl<T> TowerCompatExt for T
source§fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
ResBody::Data: Into<Bytes> + Send + 'static,
ResBody::Error: StdError + Send + Sync + 'static,
Err: Into<Error>,
Self: Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + Sized + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
fn compat<ResBody, Err, Fut>(self) -> TowerCompatEndpoint<Self>where
ResBody: Body + Send + Sync + 'static,
ResBody::Data: Into<Bytes> + Send + 'static,
ResBody::Error: StdError + Send + Sync + 'static,
Err: Into<Error>,
Self: Service<Request<BoxBody<Bytes, Error>>, Response = Response<ResBody>, Error = Err, Future = Fut> + Clone + Send + Sync + Sized + 'static,
Fut: Future<Output = Result<Response<ResBody>, Err>> + Send + 'static,
Available on crate feature
tower-compat
only.Converts a tower service to a poem endpoint.