Ada 3.4.4
Fast spec-compliant URL parser
Loading...
Searching...
No Matches
ada::scheme::details Namespace Reference

Includes the definitions for scheme specific entities. More...

Functions

constexpr uint64_t make_key (std::string_view sv)
uint64_t branchless_load5 (const char *p, size_t n)

Variables

constexpr std::string_view is_special_list []
constexpr uint16_t special_ports [] = {80, 0, 443, 80, 21, 443, 0, 0}
constexpr uint64_t scheme_keys []

Detailed Description

Includes the definitions for scheme specific entities.

Function Documentation

◆ branchless_load5()

uint64_t ada::scheme::details::branchless_load5 ( const char * p,
size_t n )
inline

Definition at line 48 of file scheme-inl.h.

Referenced by ada::scheme::get_scheme_type(), and ada::scheme::get_special_port().

◆ make_key()

uint64_t ada::scheme::details::make_key ( std::string_view sv)
constexpr

Definition at line 26 of file scheme-inl.h.

Variable Documentation

◆ is_special_list

std::string_view ada::scheme::details::is_special_list[]
constexpr
Initial value:
= {"http", " ", "https", "ws",
"ftp", "wss", "file", " "}

Definition at line 19 of file scheme-inl.h.

Referenced by ada::url::get_protocol(), ada::scheme::get_scheme_type(), and ada::scheme::get_special_port().

◆ scheme_keys

uint64_t ada::scheme::details::scheme_keys[]
constexpr
Initial value:
= {
make_key("http"),
0,
make_key("https"),
make_key("ws"),
make_key("ftp"),
make_key("wss"),
make_key("file"),
0,
}
constexpr uint64_t make_key(std::string_view sv)
Definition scheme-inl.h:26

Definition at line 34 of file scheme-inl.h.

Referenced by ada::scheme::get_scheme_type(), and ada::scheme::get_special_port().

◆ special_ports

uint16_t ada::scheme::details::special_ports[] = {80, 0, 443, 80, 21, 443, 0, 0}
constexpr

Definition at line 22 of file scheme-inl.h.

Referenced by ada::scheme::get_special_port(), and ada::scheme::get_special_port().