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
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: &Raw) -> Result<ReferrerPolicy>
fn parse_header(raw: &Raw) -> Result<ReferrerPolicy>
Parse a header from a raw stream of bytes. Read more
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
)