Trait AuthorityInputExt
pub trait AuthorityInputExt {
// Required method
fn authority(&self) -> Option<HostWithOptPort>;
// Provided methods
fn host(&self) -> Option<Host> { ... }
fn host_as_domain(&self) -> Option<Domain> { ... }
fn port(&self) -> Option<u16> { ... }
}Available on crate feature
net only.Expand description
Read the routing authority (host[:port]) of a service input.
This is the HTTP routing authority — the :authority pseudo-header / Host
header target — so it is a HostWithOptPort, not the RFC-3986
Authority type (userinfo is never used for
routing). Returns None when no authority can be resolved.
Required Methods§
The routing authority (host[:port]), or None if none is resolvable.
Provided Methods§
fn host_as_domain(&self) -> Option<Domain>
fn host_as_domain(&self) -> Option<Domain>
The authority host as a Domain, or None if absent or not a domain
(e.g. an IP literal).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".