pub struct HttpUrlComponents {
pub protocol: Protocol,
pub host: OptionString,
pub port: OptionU16,
pub path: OptionString,
pub query: OptionString,
pub fragment: OptionString,
}
Expand description
Represents the components of a parsed HTTP URL.
This struct holds various parts of a URL, including the protocol, host, port, path, query, and fragment, allowing for structured access to URL information.
Fields§
§protocol: Protocol
The URL scheme, such as “http” or “https”.
host: OptionString
The host part of the URL.
port: OptionU16
The port number in the URL, if specified.
path: OptionString
The path in the URL.
query: OptionString
The query string in the URL.
fragment: OptionString
The fragment identifier.
Implementations§
Source§impl HttpUrlComponents
impl HttpUrlComponents
Sourcepub fn parse(url_str: &str) -> Result<Self, HttpUrlError>
pub fn parse(url_str: &str) -> Result<Self, HttpUrlError>
Trait Implementations§
Source§impl Clone for HttpUrlComponents
impl Clone for HttpUrlComponents
Source§fn clone(&self) -> HttpUrlComponents
fn clone(&self) -> HttpUrlComponents
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for HttpUrlComponents
impl Debug for HttpUrlComponents
Source§impl Default for HttpUrlComponents
Implements the Default
trait for HttpUrlComponents
.
impl Default for HttpUrlComponents
Implements the Default
trait for HttpUrlComponents
.
Source§impl PartialEq for HttpUrlComponents
impl PartialEq for HttpUrlComponents
impl Eq for HttpUrlComponents
impl StructuralPartialEq for HttpUrlComponents
Auto Trait Implementations§
impl Freeze for HttpUrlComponents
impl RefUnwindSafe for HttpUrlComponents
impl Send for HttpUrlComponents
impl Sync for HttpUrlComponents
impl Unpin for HttpUrlComponents
impl UnwindSafe for HttpUrlComponents
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