pub enum ReferrerPolicy {
NoReferrer,
NoReferrerWhenDowngrade,
SameOrigin,
Origin,
OriginWhenCrossOrigin,
UnsafeUrl,
StrictOrigin,
StrictOriginWhenCrossOrigin,
}
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 hyper::header::{Headers, ReferrerPolicy};
let mut headers = Headers::new();
headers.set(ReferrerPolicy::NoReferrer);
Variants§
NoReferrer
no-referrer
NoReferrerWhenDowngrade
no-referrer-when-downgrade
SameOrigin
same-origin
Origin
origin
OriginWhenCrossOrigin
origin-when-cross-origin
UnsafeUrl
unsafe-url
StrictOrigin
strict-origin
StrictOriginWhenCrossOrigin
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 Display for ReferrerPolicy
impl Display for ReferrerPolicy
§impl From<ReferrerPolicy> for Header<'static>
impl From<ReferrerPolicy> for Header<'static>
§fn from(header: ReferrerPolicy) -> Header<'static>
fn from(header: ReferrerPolicy) -> Header<'static>
Converts to this type from the input type.
source§impl Header for ReferrerPolicy
impl Header for ReferrerPolicy
source§fn header_name() -> &'static str
fn header_name() -> &'static str
Returns the name of the header field this belongs to. Read more
source§fn parse_header(raw: &[Vec<u8>]) -> Result<ReferrerPolicy, Error>
fn parse_header(raw: &[Vec<u8>]) -> Result<ReferrerPolicy, Error>
Parse a header from a raw stream of bytes. Read more
source§impl HeaderFormat for ReferrerPolicy
impl HeaderFormat 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
)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.