http_type/http_url/
struct.rs

1use crate::*;
2
3/// Represents the components of a parsed HTTP URL.
4///
5/// This struct holds various parts of a URL, including the protocol, host, port,
6/// path, query, and fragment, allowing for structured access to URL information.
7#[derive(Debug, Clone, PartialEq, Eq, Default)]
8pub struct HttpUrlComponents {
9    /// The URL scheme, such as "http" or "https".
10    pub protocol: Protocol,
11    /// The host part of the URL.
12    pub host: OptionString,
13    /// The port number in the URL, if specified.
14    pub port: OptionU16,
15    /// The path in the URL.
16    pub path: OptionString,
17    /// The query string in the URL.
18    pub query: OptionString,
19    /// The fragment identifier.
20    pub fragment: OptionString,
21}