pub trait UriExt {
// Required methods
fn host_str(&self) -> Option<&str>;
fn port_or_default(&self) -> Option<u16>;
fn is_https(&self) -> bool;
fn is_http(&self) -> bool;
fn origin(&self) -> Option<String>;
}Expand description
Extension trait providing convenience methods for http::Uri.
Required Methods§
Sourcefn port_or_default(&self) -> Option<u16>
fn port_or_default(&self) -> Option<u16>
Return the port, or the default port for the scheme (80 for HTTP, 443 for HTTPS).
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".