75 std::string username{};
82 std::string password{};
88 std::optional<std::string> host{};
95 std::optional<uint16_t> port{};
108 std::optional<std::string> query{};
116 std::optional<std::string> hash{};
416 std::
string non_special_scheme{};
422 [[
nodiscard]]
inline bool cannot_have_credentials_or_port()
const;
428 return this->parse_port(
view,
false);
441 template <
bool has_state_overr
ide = false>
444 constexpr void clear_pathname()
override;
445 constexpr void clear_search()
override;
446 constexpr void set_protocol_as_file();
465 inline void set_scheme(std::string &&
new_scheme)
noexcept;
471 constexpr void copy_scheme(
ada::url &&
u);
477 constexpr void copy_scheme(
const ada::url &
u);
Declarations for URL specific checkers used within Ada.
Cross-platform compiler macros and common definitions.
#define ada_really_inline
Definitions for helper functions used within Ada.
std::ostream & operator<<(std::ostream &out, const ada::url &u)
ada_warn_unused ada::result< result_type > parse(std::string_view input, const result_type *base_url=nullptr)
Memory-efficient URL representation using a single buffer.
Abstract base class for URL representations.
Represents a parsed URL with individual string components.
void set_hash(std::string_view input)
bool set_hostname(std::string_view input)
bool set_host(std::string_view input)
ada_really_inline ada::url_components get_components() const noexcept
url(url &&u) noexcept=default
bool has_empty_hostname() const noexcept
bool has_port() const noexcept
ada_really_inline bool has_credentials() const noexcept
friend ada::url ada::parser::parse_url(std::string_view, const ada::url *)
bool set_password(std::string_view input)
url & operator=(url &&u) noexcept=default
url & operator=(const url &u)=default
void set_search(std::string_view input)
ada_really_inline size_t get_pathname_length() const noexcept
std::string get_search() const
bool set_href(std::string_view input)
std::string get_port() const
std::string get_protocol() const
bool has_hostname() const noexcept
std::string get_host() const
bool set_username(std::string_view input)
constexpr std::string_view get_pathname() const noexcept
url(const url &u)=default
bool set_pathname(std::string_view input)
std::string get_hostname() const
ada_really_inline std::string get_href() const
friend ada::url ada::parser::parse_url_impl(std::string_view, const ada::url *)
std::string get_origin() const override
const std::string & get_password() const noexcept
bool set_protocol(std::string_view input)
const std::string & get_username() const noexcept
friend void ada::helpers::strip_trailing_spaces_from_opaque_path(ada::url &url)
bool set_port(std::string_view input)
constexpr bool has_search() const noexcept override
std::string to_string() const override
std::string get_hash() const
constexpr bool has_hash() const noexcept override
bool has_valid_domain() const noexcept override
Base class and common definitions for URL types.
Declaration for the URL Components.