RESTinio
|
Namespaces | |
namespace | base64 |
namespace | details |
namespace | impl |
namespace | metaprogramming |
namespace | scope_exit_details |
namespace | sha1 |
namespace | tuple_algorithms |
namespace | uri_normalization |
Classes | |
struct | javascript_compatible_unescape_traits |
The traits for escaping and unexcaping symbols in JavaScript-compatible mode. More... | |
struct | relaxed_unescape_traits |
Traits for escaping and unescaping symbols in a query string in very relaxed mode. More... | |
struct | restinio_default_unescape_traits |
The default traits for escaping and unexcaping symbols in a query string. More... | |
class | tagged_scalar_t |
Helper template for defining tagged scalar types. More... | |
class | unescape_percent_encoding_failure_t |
Type that indicates a failure of unescaping of percent-encoded symbols. More... | |
struct | unescape_percent_encoding_success_t |
Type that indicates that unescaping of percent-encoded symbols completed successfully. More... | |
class | utf8_checker_t |
Helper class for checking UTF-8 byte sequence during parsing URI or incoming byte stream. More... | |
struct | x_www_form_urlencoded_unescape_traits |
Traits for escaping and unexcaping symbols in a query string in correspondence with application/x-www-form-urlencoded rules. More... | |
Functions | |
template<typename L > | |
scope_exit_details::at_exit_t< L > | at_scope_exit (L &&l) |
Helper function for creation action to be performed at scope exit. More... | |
template<typename Value_Type > | |
Value_Type | from_string (string_view_t s) |
Get a value from string. More... | |
template<> | |
std::string | from_string< std::string > (string_view_t s) |
Get a value from string. More... | |
template<> | |
string_view_t | from_string< string_view_t > (string_view_t s) |
Get a value from string_view. More... | |
template<typename Logger , typename Message_Builder > | |
void | log_trace_noexcept (Logger &&logger, Message_Builder &&builder) noexcept |
template<typename Message_Builder > | |
void | log_trace_noexcept (null_logger_t &, Message_Builder &&) noexcept |
template<typename Logger , typename Message_Builder > | |
void | log_info_noexcept (Logger &&logger, Message_Builder &&builder) noexcept |
template<typename Message_Builder > | |
void | log_info_noexcept (null_logger_t &, Message_Builder &&) noexcept |
template<typename Logger , typename Message_Builder > | |
void | log_warn_noexcept (Logger &&logger, Message_Builder &&builder) noexcept |
template<typename Message_Builder > | |
void | log_warn_noexcept (null_logger_t &, Message_Builder &&) noexcept |
template<typename Logger , typename Message_Builder > | |
void | log_error_noexcept (Logger &&logger, Message_Builder &&builder) noexcept |
template<typename Message_Builder > | |
void | log_error_noexcept (null_logger_t &, Message_Builder &&) noexcept |
template<typename Logger , typename Lambda > | |
void | suppress_exceptions (Logger &&logger, const char *block_description, Lambda &&lambda) noexcept |
Helper function for execution a block of code with suppression of any exceptions raised inside that block. More... | |
template<typename Lambda > | |
void | suppress_exceptions_quietly (Lambda &&lambda) noexcept |
Helper function for execution a block of code with suppression of any exceptions raised inside that block. More... | |
void | read_value (std::int64_t &v, const char *data, std::size_t size) |
Read int values. More... | |
void | read_value (std::uint64_t &v, const char *data, std::size_t size) |
void | read_value (std::int32_t &v, const char *data, std::size_t size) |
void | read_value (std::uint32_t &v, const char *data, std::size_t size) |
void | read_value (std::int16_t &v, const char *data, std::size_t size) |
void | read_value (std::uint16_t &v, const char *data, std::size_t size) |
void | read_value (std::int8_t &v, const char *data, std::size_t size) |
void | read_value (std::uint8_t &v, const char *data, std::size_t size) |
void | read_value (float &v, const char *data, std::size_t size) |
Read float values. More... | |
void | read_value (double &v, const char *data, std::size_t size) |
template<typename Traits = restinio_default_unescape_traits> | |
RESTINIO_NODISCARD std::string | escape_percent_encoding (const string_view_t data) |
Percent encoding. More... | |
template<typename Traits = restinio_default_unescape_traits> | |
RESTINIO_NODISCARD std::string | unescape_percent_encoding (const string_view_t data) |
template<typename Traits = restinio_default_unescape_traits> | |
RESTINIO_NODISCARD expected_t< std::string, unescape_percent_encoding_failure_t > | try_unescape_percent_encoding (const string_view_t data) |
Helper function for unescaping percent-encoded string. More... | |
template<typename Traits = restinio_default_unescape_traits> | |
RESTINIO_NODISCARD std::size_t | inplace_unescape_percent_encoding (char *data, std::size_t size) |
template<typename Traits = restinio_default_unescape_traits> | |
RESTINIO_NODISCARD expected_t< std::size_t, unescape_percent_encoding_failure_t > | try_inplace_unescape_percent_encoding (char *data, std::size_t size) |
Helper function for unescaping percent-encoded string inplace. More... | |
scope_exit_details::at_exit_t< L > restinio::utils::at_scope_exit | ( | L && | l | ) |
Helper function for creation action to be performed at scope exit.
Usage example:
Definition at line 60 of file at_scope_exit.hpp.
RESTINIO_NODISCARD std::string restinio::utils::escape_percent_encoding | ( | const string_view_t | data | ) |
Percent encoding.
Definition at line 328 of file percent_encoding.hpp.
Value_Type restinio::utils::from_string | ( | string_view_t | s | ) |
Get a value from string.
Definition at line 105 of file from_string.hpp.
|
inline |
Get a value from string.
Definition at line 116 of file from_string.hpp.
|
inline |
Get a value from string_view.
Definition at line 124 of file from_string.hpp.
RESTINIO_NODISCARD std::size_t restinio::utils::inplace_unescape_percent_encoding | ( | char * | data, |
std::size_t | size | ||
) |
Definition at line 409 of file percent_encoding.hpp.
|
noexcept |
Definition at line 71 of file suppress_exceptions.hpp.
|
noexcept |
Definition at line 79 of file suppress_exceptions.hpp.
|
noexcept |
Definition at line 45 of file suppress_exceptions.hpp.
|
noexcept |
Definition at line 53 of file suppress_exceptions.hpp.
|
noexcept |
Definition at line 32 of file suppress_exceptions.hpp.
|
noexcept |
Definition at line 40 of file suppress_exceptions.hpp.
|
noexcept |
Definition at line 58 of file suppress_exceptions.hpp.
|
noexcept |
Definition at line 66 of file suppress_exceptions.hpp.
|
inline |
Definition at line 94 of file from_string.hpp.
|
inline |
Read float values.
Definition at line 86 of file from_string.hpp.
|
inline |
Definition at line 58 of file from_string.hpp.
|
inline |
Definition at line 46 of file from_string.hpp.
|
inline |
Read int values.
Definition at line 34 of file from_string.hpp.
|
inline |
Definition at line 70 of file from_string.hpp.
|
inline |
Definition at line 64 of file from_string.hpp.
|
inline |
Definition at line 52 of file from_string.hpp.
|
inline |
Definition at line 40 of file from_string.hpp.
|
inline |
Definition at line 76 of file from_string.hpp.
|
noexcept |
Helper function for execution a block of code with suppression of any exceptions raised inside that block.
Exceptions caught are logged via logger. Exceptions thrown during this logging are suppressed.
logger | Logger to be used. |
block_description | Description of the block of code. Will be used for logging about exceptions caught. |
lambda | Block of code for execution. |
Definition at line 94 of file suppress_exceptions.hpp.
|
noexcept |
Helper function for execution a block of code with suppression of any exceptions raised inside that block.
All exceptions are simply intercepted. Nothing is logged in the case of an exception thrown.
Definition at line 133 of file suppress_exceptions.hpp.
RESTINIO_NODISCARD expected_t< std::size_t, unescape_percent_encoding_failure_t > restinio::utils::try_inplace_unescape_percent_encoding | ( | char * | data, |
std::size_t | size | ||
) |
Helper function for unescaping percent-encoded string inplace.
This function doesn't throw if some character can't be unescaped or some ill-formed sequence is found.
Definition at line 441 of file percent_encoding.hpp.
RESTINIO_NODISCARD expected_t< std::string, unescape_percent_encoding_failure_t > restinio::utils::try_unescape_percent_encoding | ( | const string_view_t | data | ) |
Helper function for unescaping percent-encoded string.
This function doesn't throw if some character can't be unescaped or some ill-formed sequence is found.
Definition at line 392 of file percent_encoding.hpp.
RESTINIO_NODISCARD std::string restinio::utils::unescape_percent_encoding | ( | const string_view_t | data | ) |
Definition at line 363 of file percent_encoding.hpp.