Struct hyper::header::common::location::Location [-]  [+] [src]

pub struct Location(pub String);

The Location header.

The Location response-header field is used to redirect the recipient to a location other than the Request-URI for completion of the request or identification of a new resource. For 201 (Created) responses, the Location is that of the new resource which was created by the request. For 3xx responses, the location SHOULD indicate the server's preferred URI for automatic redirection to the resource. The field value consists of a single absolute URI.

Currently is just a String, but it should probably become a better type, like url::Url or something.

Trait Implementations

impl Deref for Location

type Target = String

fn deref<'a>(&'a self) -> &'a String

impl DerefMut for Location

fn deref_mut<'a>(&'a mut self) -> &'a mut String

impl Header for Location

fn header_name(_: Option<Location>) -> &'static str

fn parse_header(raw: &[Vec<u8>]) -> Option<Location>

impl HeaderFormat for Location

fn fmt_header(&self, fmt: &mut Formatter) -> Result

Derived Implementations

impl Show for Location

fn fmt(&self, __arg_0: &mut Formatter) -> Result

impl PartialEq for Location

fn eq(&self, __arg_0: &Location) -> bool

fn ne(&self, __arg_0: &Location) -> bool

impl Clone for Location

fn clone(&self) -> Location

fn clone_from(&mut self, source: &Self)