![]() |
Nix 2.36.0
Nix, the purely functional package manager; unstable internal interfaces
|
#include <url.hh>
Public Types | |
| enum class | HostType { Name , IPv4 , IPv6 , IPvFuture } |
Public Member Functions | |
| auto | operator<=> (const Authority &other) const =default |
| std::string | to_string () const |
Static Public Member Functions | |
| static Authority | parse (std::string_view encodedAuthority) |
Public Attributes | |
| HostType | hostType = HostType::Name |
| std::string | host |
| std::optional< std::string > | user |
| std::optional< std::string > | password |
| std::optional< uint16_t > | port |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const Authority &self) |
Parsed representation of a URL authority.
It consists of user information, hostname and an optional port number. Note that passwords in the userinfo are not yet supported and are ignored.
| std::string nix::ParsedURL::Authority::host |
Host subcomponent. Either a registered name or IPv{4,6,Future} literal addresses.
IPv6 enclosing brackets are already stripped. Percent encoded characters in the hostname are decoded.
| HostType nix::ParsedURL::Authority::hostType = HostType::Name |
Type of the host subcomponent, as specified by rfc3986 3.2.2. Host.
| std::optional<std::string> nix::ParsedURL::Authority::password |
Password subcomponent of the authority (if specified).
| std::optional<uint16_t> nix::ParsedURL::Authority::port |
Port subcomponent (if specified). Default value is determined by the scheme.
| std::optional<std::string> nix::ParsedURL::Authority::user |
Percent-decoded user part of the userinfo.