pub struct Port<T> { /* private fields */ }
The port component of a URI.
Returns the port number as a u16.
u16
Port as u16.
let authority: Authority = "example.org:80".parse().unwrap(); let port = authority.port().unwrap(); assert_eq!(port.as_u16(), 80);
Returns the port number as a str.
str
Port as str.