Ada 3.4.0
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
url_components.h
Go to the documentation of this file.
1
9#ifndef ADA_URL_COMPONENTS_H
10#define ADA_URL_COMPONENTS_H
11
12namespace ada {
13
41 constexpr static uint32_t omitted = uint32_t(-1);
42
43 url_components() = default;
44 url_components(const url_components &u) = default;
45 url_components(url_components &&u) noexcept = default;
46 url_components &operator=(url_components &&u) noexcept = default;
48 ~url_components() = default;
49
51 uint32_t protocol_end{0};
52
57 uint32_t username_end{0};
58
60 uint32_t host_start{0};
61
63 uint32_t host_end{0};
64
66 uint32_t port{omitted};
67
69 uint32_t pathname_start{0};
70
73
76
82 [[nodiscard]] constexpr bool check_offset_consistency() const noexcept;
83
88 [[nodiscard]] std::string to_string() const;
89
90}; // struct url_components
91} // namespace ada
92#endif
Definition ada_idna.h:13
ada_warn_unused std::string_view to_string(encoding_type type)
static constexpr uint32_t omitted
constexpr bool check_offset_consistency() const noexcept
url_components & operator=(url_components &&u) noexcept=default
~url_components()=default
url_components()=default
url_components(url_components &&u) noexcept=default
url_components(const url_components &u)=default
url_components & operator=(const url_components &u)=default