pub struct Host { /* private fields */ }
Expand description
The Host
header.
HTTP/1.1 requires that all requests include a Host
header, and so hyper
client requests add one automatically.
Examples
use hyperx::header::{Headers, Host};
let mut headers = Headers::new();
headers.set(
Host::new("hyper.rs", None)
);
use hyperx::header::{Headers, Host};
let mut headers = Headers::new();
headers.set(
// In Rust 1.12+
// Host::new("hyper.rs", 8080)
Host::new("hyper.rs", Some(8080))
);
Implementations
Trait Implementations
sourceimpl Header for Host
impl Header for Host
impl StructuralPartialEq for Host
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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more