Struct headers_ext::Referer[][src]

pub struct Referer(_);

Referer header, defined in RFC7231

The Referer [sic] header field allows the user agent to specify a URI reference for the resource from which the target URI was obtained (i.e., the "referrer", though the field name is misspelled). A user agent MUST NOT include the fragment and userinfo components of the URI reference, if any, when generating the Referer field value.

ABNF

Referer = absolute-URI / partial-URI

Example values

  • http://www.example.org/hypertext/Overview.html

Examples

use headers::Referer;

let r = Referer::from_static("/People.html#tim");

Methods

impl Referer
[src]

Create a Referer with a static string.

Panic

Panics if the string is not a legal header value.

Trait Implementations

impl Debug for Referer
[src]

Formats the value using the given formatter. Read more

impl Clone for Referer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl PartialEq for Referer
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl FromStr for Referer
[src]

The associated error which can be returned from parsing.

Parses a string s to return a value of this type. Read more

Auto Trait Implementations

impl Send for Referer

impl Sync for Referer