44 static tl::expected<url_pattern_init, errors>
process(
46 std::optional<std::string_view>
protocol = std::nullopt,
47 std::optional<std::string_view>
username = std::nullopt,
48 std::optional<std::string_view>
password = std::nullopt,
49 std::optional<std::string_view>
hostname = std::nullopt,
50 std::optional<std::string_view>
port = std::nullopt,
51 std::optional<std::string_view>
pathname = std::nullopt,
52 std::optional<std::string_view>
search = std::nullopt,
53 std::optional<std::string_view>
hash = std::nullopt);
84 static tl::expected<std::string, errors>
process_hash(std::string_view value,
89 *os <<
"protocol: '" << init.
protocol.value_or(
"undefined") <<
"', ";
90 *os <<
"username: '" << init.
username.value_or(
"undefined") <<
"', ";
91 *os <<
"password: '" << init.
password.value_or(
"undefined") <<
"', ";
92 *os <<
"hostname: '" << init.
hostname.value_or(
"undefined") <<
"', ";
93 *os <<
"port: '" << init.
port.value_or(
"undefined") <<
"', ";
94 *os <<
"pathname: '" << init.
pathname.value_or(
"undefined") <<
"', ";
95 *os <<
"search: '" << init.
search.value_or(
"undefined") <<
"', ";
96 *os <<
"hash: '" << init.
hash.value_or(
"undefined") <<
"', ";
97 *os <<
"base_url: '" << init.
base_url.value_or(
"undefined") <<
"', ";
101 bool operator==(
const url_pattern_init&)
const;
111 std::optional<std::string>
port{};
117 std::optional<std::string>
hash{};
static tl::expected< url_pattern_init, errors > process(url_pattern_init init, process_type type, std::optional< std::string_view > protocol=std::nullopt, std::optional< std::string_view > username=std::nullopt, std::optional< std::string_view > password=std::nullopt, std::optional< std::string_view > hostname=std::nullopt, std::optional< std::string_view > port=std::nullopt, std::optional< std::string_view > pathname=std::nullopt, std::optional< std::string_view > search=std::nullopt, std::optional< std::string_view > hash=std::nullopt)