|
CAF 0.17.6
|
A URI according to RFC 3986. More...
#include <uri.hpp>
Classes | |
| struct | authority_type |
| Bundles the authority component of the URI, i.e., userinfo, host, and port. More... | |
Public Types | |
| using | impl_ptr = intrusive_ptr< const detail::uri_impl > |
| Pointer to implementation. | |
| using | host_type = variant< std::string, ip_address > |
| Host subcomponent of the authority component. | |
| using | path_list = std::vector< string_view > |
| Separates the query component into key-value pairs. | |
| using | query_map = detail::unordered_flat_map< std::string, std::string > |
| Separates the query component into key-value pairs. | |
Public Member Functions | |
| uri (uri &&)=default | |
| uri (const uri &)=default | |
| uri & | operator= (uri &&)=default |
| uri & | operator= (const uri &)=default |
| uri (impl_ptr ptr) | |
| bool | empty () const noexcept |
| Returns whether all components of this URI are empty. | |
| string_view | str () const noexcept |
| Returns the full URI as provided by the user. | |
| string_view | scheme () const noexcept |
| Returns the scheme component. | |
| const authority_type & | authority () const noexcept |
| Returns the authority component. | |
| string_view | path () const noexcept |
| Returns the path component as provided by the user. | |
| const query_map & | query () const noexcept |
| Returns the query component as key-value map. | |
| string_view | fragment () const noexcept |
| Returns the fragment component. | |
| size_t | hash_code () const noexcept |
| Returns a hash code over all components. | |
| optional< uri > | authority_only () const |
Returns a new URI with the authority component only. | |
| int | compare (const uri &other) const noexcept |
| int | compare (string_view x) const noexcept |
Static Public Member Functions | |
| static bool | can_parse (string_view str) noexcept |
Returns whether parse would produce a valid URI. | |
Friends | |
| error | inspect (caf::serializer &dst, uri &x) |
| error | inspect (caf::deserializer &src, uri &x) |
Related Symbols | |
(Note that these are not member symbols.) | |
| std::string | to_string (const uri &x) |
| std::string | to_string (const uri::authority_type &x) |
| error | parse (string_view str, uri &dest) |
| expected< uri > | make_uri (string_view str) |
A URI according to RFC 3986.
| using caf::uri::host_type = variant<std::string, ip_address> |
Host subcomponent of the authority component.
Either an IP address or an hostname as string.
Returns a new URI with the authority component only.
scheme://authority if the authority exists, otherwise none.`