37 bool set_href(std::string_view input);
38 bool set_host(std::string_view input);
43 bool set_port(std::string_view input);
46 void set_hash(std::string_view input);
55 [[nodiscard]] std::
string get_origin() const noexcept override;
64 [[nodiscard]] constexpr std::string_view
get_href() const noexcept
72 [[nodiscard]] std::string_view
get_username() const noexcept
80 [[nodiscard]] std::string_view
get_password() const noexcept
112 [[nodiscard]] std::string_view
get_hostname() const noexcept
121 [[nodiscard]] constexpr std::string_view
get_pathname() const noexcept
144 [[nodiscard]] std::string_view
get_protocol() const noexcept
180 [[nodiscard]] std::
string to_string() const override;
191 [[nodiscard]] constexpr
bool validate() const noexcept;
196 [[nodiscard]] constexpr
bool has_hostname() const noexcept;
202 [[nodiscard]] constexpr
bool has_port() const noexcept;
204 [[nodiscard]] constexpr
bool has_password() const noexcept;
206 [[nodiscard]] constexpr
bool has_hash() const noexcept override;
208 [[nodiscard]] constexpr
bool has_search() const noexcept override;
227#if ADA_INCLUDE_URL_PATTERN
229 template <url_pattern_regex::regex_concept regex_prov
ider>
230 friend tl::expected<url_pattern<regex_provider>,
errors>
231 parse_url_pattern_impl(
232 std::variant<std::string_view, url_pattern_init> &&input,
236 std::string buffer{};
246 inline
void add_authority_slashes_if_needed() noexcept;
252 constexpr
void reserve(uint32_t capacity);
255 std::string_view view,
bool check_trailing_content) noexcept override;
258 return this->parse_port(view,
false);
267 [[nodiscard]]
bool parse_ipv4(std::string_view input,
bool in_place);
273 [[nodiscard]]
bool parse_ipv6(std::string_view input);
279 [[nodiscard]]
bool parse_opaque_host(std::string_view input);
287 [[nodiscard]]
constexpr bool cannot_have_credentials_or_port()
const;
289 template <
bool overr
ide_hostname = false>
290 bool set_host_or_hostname(std::string_view input);
294 inline void update_base_authority(std::string_view base_buffer,
295 const url_components &base);
296 inline void update_unencoded_base_hash(std::string_view input);
297 inline void update_base_hostname(std::string_view input);
298 inline void update_base_search(std::string_view input);
299 inline void update_base_search(std::string_view input,
300 const uint8_t *query_percent_encode_set);
301 inline void update_base_pathname(std::string_view input);
302 inline void update_base_username(std::string_view input);
303 inline void append_base_username(std::string_view input);
304 inline void update_base_password(std::string_view input);
305 inline void append_base_password(std::string_view input);
306 inline void update_base_port(uint32_t input);
307 inline void append_base_pathname(std::string_view input);
308 [[nodiscard]]
inline uint32_t retrieve_base_port()
const;
309 constexpr void clear_hostname();
310 constexpr void clear_password();
311 constexpr void clear_pathname()
override;
312 [[nodiscard]]
constexpr bool has_dash_dot() const noexcept;
313 void delete_dash_dot();
314 inline
void consume_prepared_path(std::string_view input);
315 template <
bool has_state_override = false>
317 std::string_view input);
319 std::string_view input);
320 [[nodiscard]] constexpr
bool has_authority() const noexcept;
321 constexpr
void set_protocol_as_file();
322 inline
void set_scheme(std::string_view new_scheme) noexcept;
327 inline
void set_scheme_from_view_with_colon(
328 std::string_view new_scheme_with_colon) noexcept;
331 inline
void update_host_to_base_host(const std::string_view input) noexcept;