37 static tl::expected<url_pattern_init, errors>
process(
39 std::optional<std::string_view>
protocol = std::nullopt,
40 std::optional<std::string_view>
username = std::nullopt,
41 std::optional<std::string_view>
password = std::nullopt,
42 std::optional<std::string_view>
hostname = std::nullopt,
43 std::optional<std::string_view>
port = std::nullopt,
44 std::optional<std::string_view>
pathname = std::nullopt,
45 std::optional<std::string_view>
search = std::nullopt,
46 std::optional<std::string_view>
hash = std::nullopt);
50 std::string_view value, std::string_view type);
54 std::string_view value, std::string_view type);
58 std::string_view value, std::string_view type);
62 std::string_view value, std::string_view type);
66 std::string_view
port, std::string_view
protocol, std::string_view type);
70 std::string_view value, std::string_view
protocol, std::string_view type);
74 std::string_view value, std::string_view type);
77 static tl::expected<std::string, errors>
process_hash(std::string_view value,
78 std::string_view type);
82 *os <<
"protocol: '" << init.
protocol.value_or(
"undefined") <<
"', ";
83 *os <<
"username: '" << init.
username.value_or(
"undefined") <<
"', ";
84 *os <<
"password: '" << init.
password.value_or(
"undefined") <<
"', ";
85 *os <<
"hostname: '" << init.
hostname.value_or(
"undefined") <<
"', ";
86 *os <<
"port: '" << init.
port.value_or(
"undefined") <<
"', ";
87 *os <<
"pathname: '" << init.
pathname.value_or(
"undefined") <<
"', ";
88 *os <<
"search: '" << init.
search.value_or(
"undefined") <<
"', ";
89 *os <<
"hash: '" << init.
hash.value_or(
"undefined") <<
"', ";
90 *os <<
"base_url: '" << init.
base_url.value_or(
"undefined") <<
"', ";
100 std::optional<std::string>
port{};
103 std::optional<std::string>
hash{};
static tl::expected< url_pattern_init, errors > process(url_pattern_init init, std::string_view 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)