Struct typed_headers::Host[][src]

pub struct Host { /* fields omitted */ }

The Host header, defined in RFC7230.

The "Host" header field in a request provides the host and port information from the target URI, enabling the origin server to distinguish among resources while servicing requests for multiple host names on a single IP address.

ABNF

Host = uri-host [ ":" port ]

Methods

impl Host
[src]

Creates a Host header from a hostname and optional port.

Creates a Host header from a URI authority component.

The userinfo portion of the authority is not included in the header.

Returns the host.

Returns the port.

Trait Implementations

impl Debug for Host
[src]

Formats the value using the given formatter. Read more

impl Clone for Host
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Header for Host
[src]

Returns the name of this header. Read more

Parses the header from the raw value bytes. Read more

Serializes the header to raw values. Read more

Auto Trait Implementations

impl Send for Host

impl Sync for Host