Struct websocket::header::Host [−][src]
The Host
header.
HTTP/1.1 requires that all requests include a Host
header, and so hyper
client requests add one automatically.
Currently is just a String, but it should probably become a better type,
like url::Host
or something.
Examples
use hyper::header::{Headers, Host}; let mut headers = Headers::new(); headers.set( Host{ hostname: "hyper.rs".to_owned(), port: None, } );
use hyper::header::{Headers, Host}; let mut headers = Headers::new(); headers.set( Host{ hostname: "hyper.rs".to_owned(), port: Some(8080), } );
Fields
hostname: String
The hostname, such a example.domain.
port: Option<u16>
An optional port number.
Trait Implementations
impl Clone for Host
[src]
impl Debug for Host
[src]
impl Display for Host
[src]
impl FromStr for Host
[src]
type Err = Error
The associated error which can be returned from parsing.
pub fn from_str(s: &str) -> Result<Host, Error>
[src]
impl Header for Host
[src]
pub fn header_name() -> &'static str
[src]
pub fn parse_header(raw: &[Vec<u8, Global>]) -> Result<Host, Error>
[src]
impl HeaderFormat for Host
[src]
impl PartialEq<Host> for Host
[src]
impl StructuralPartialEq for Host
[src]
Auto Trait Implementations
impl RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl UnwindSafe for Host
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T> HeaderClone for T where
T: Sealed,
[src]
T: Sealed,
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Typeable for T where
T: Any,
T: Any,