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::{Host, TypedHeaders};
let mut headers = http::HeaderMap::new();
headers.encode(
&Host::new("hyper.rs", None)
);
use hyperx::header::{Host, TypedHeaders};
let mut headers = http::HeaderMap::new();
headers.encode(
&Host::new("hyper.rs", 8080)
);
Implementations§
Trait Implementations§
Source§impl Header for Host
impl Header for Host
Source§impl StandardHeader for Host
impl StandardHeader for Host
Source§fn http_header_name() -> HeaderName
fn http_header_name() -> HeaderName
The
HeaderName
from the http crate for this header.impl StructuralPartialEq for Host
Auto Trait Implementations§
impl Freeze for Host
impl RefUnwindSafe for Host
impl Send for Host
impl Sync for Host
impl Unpin for Host
impl UnwindSafe for Host
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more