Struct IRIView¶
Defined in File IRIView.hpp
Nested Relationships¶
Nested Types¶
Struct Documentation¶
-
struct IRIView¶
wrapper around a std::string_view that allows to access it as its IRI components.
Public Functions
-
explicit IRIView(std::string_view iri) noexcept¶
-
bool is_relative() const noexcept¶
is this IRI a relative reference? equivalent to scheme().empty()
- Returns:
-
AllParts all_parts() const noexcept¶
all parts of the IRI. intended to be used with structured bindings: auto [scheme, auth, path, query, frag] = iri_view.all_parts(); more efficient than querying each part individually via its method.
- Returns:
-
std::string_view to_absolute() const noexcept¶
everything except the fragment part of the IRI.
- Returns:
-
std::optional<std::string_view> userinfo() const noexcept¶
the userinfo part of the authority.
- Returns:
-
std::optional<std::string_view> host() const noexcept¶
the host part of the authority.
- Returns:
-
std::optional<std::string_view> port() const noexcept¶
the port part of the authority.
- Returns:
-
AuthorityParts all_authority_parts() const noexcept¶
all authority parts of the IRI. intended to be used with structured bindings: auto [userinfo, host, port] = iri_view.all_authority_parts(); more efficient than querying each part individually via its method.
- Returns:
-
IRIFactoryError quick_validate(bool allow_relative = false) const noexcept¶
quickly checks if the IRI is valid according to the IRI specification (not the schemes specification). (does not accept relative references) (may miss invalid IRIs)
- Returns:
-
struct AllParts¶
-
struct AuthorityParts¶
-
explicit IRIView(std::string_view iri) noexcept¶