pub struct Url {
pub scheme: String,
pub host: String,
pub port: u16,
pub path: String,
}Expand description
A parsed absolute URL (the subset we need: scheme/host/port/path).
Fields§
§scheme: String§host: String§port: u16§path: StringPath + query, always starting with /.
Implementations§
Source§impl Url
impl Url
Sourcepub fn parse(s: &str) -> Result<Url, String>
pub fn parse(s: &str) -> Result<Url, String>
Parse http(s)://host[:port][/path][?query]. No url crate — we only
support the absolute http/https forms agentd actually issues.
pub fn is_tls(&self) -> bool
Sourcepub fn host_header(&self) -> String
pub fn host_header(&self) -> String
The Host: header value (includes a non-default port).
Trait Implementations§
impl Eq for Url
impl StructuralPartialEq for Url
Auto Trait Implementations§
impl Freeze for Url
impl RefUnwindSafe for Url
impl Send for Url
impl Sync for Url
impl Unpin for Url
impl UnsafeUnpin for Url
impl UnwindSafe for Url
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