Upa URL C++ library
A WHATWG URL Standard implementation
Loading...
Searching...
No Matches
upa::url_host Class Reference

#include <upa/url_host.h>

Public Member Functions

 url_host ()=delete
 url_host (const url_host &)=default
 url_host (url_host &&) noexcept=default
url_hostoperator= (const url_host &)=default
url_hostoperator= (url_host &&) noexcept=default
template<class StrT, enable_if_str_arg_t< StrT > = 0>
 url_host (const StrT &str)
 ~url_host ()=default
 destructor
HostType type () const
std::string_view name () const
std::string to_string () const

Detailed Description

Definition at line 80 of file url_host.h.

Constructor & Destructor Documentation

◆ url_host() [1/4]

upa::url_host::url_host ( )
delete

◆ url_host() [2/4]

upa::url_host::url_host ( const url_host & )
default

◆ url_host() [3/4]

upa::url_host::url_host ( url_host && )
defaultnoexcept

◆ url_host() [4/4]

template<class StrT, enable_if_str_arg_t< StrT > = 0>
upa::url_host::url_host ( const StrT & str)
inlineexplicit

Parsing constructor

Throws url_error exception on parse error.

Parameters
[in]strHost string to parse

Definition at line 94 of file url_host.h.

◆ ~url_host()

upa::url_host::~url_host ( )
default

destructor

Member Function Documentation

◆ name()

std::string_view upa::url_host::name ( ) const
inlinenodiscard

Hostname view

Returns
serialized host as std::string_view

Definition at line 116 of file url_host.h.

◆ operator=() [1/2]

url_host & upa::url_host::operator= ( const url_host & )
default

◆ operator=() [2/2]

url_host & upa::url_host::operator= ( url_host && )
defaultnoexcept

◆ to_string()

std::string upa::url_host::to_string ( ) const
inlinenodiscard

Hostname stringifier

Returns
host serialized to string

Definition at line 123 of file url_host.h.

◆ type()

HostType upa::url_host::type ( ) const
inlinenodiscard

Host type getter

Returns
host type, the one of: Domain, IPv4, IPv6

Definition at line 109 of file url_host.h.


The documentation for this class was generated from the following file: