RESTinio
restinio::details::autodetect_request_handler_type Struct Reference

A special type to be used as indicator that the type of a request handler should be automatically detected. More...

#include <traits.hpp>

Detailed Description

A special type to be used as indicator that the type of a request handler should be automatically detected.

In versions prior to 0.6.13 request-handlers in RESTinio have the same format. But since v.0.6.13 the actual type of request-handler is dependent on extra-data-factory type. It means that if a user defines own extra-data-factory for server's traits then user also has to define own request-handler type:

struct my_extra_data_factory {...};
struct my_traits : public restinio::default_traits_t {
using extra_data_factory_t = my_extra_data_factory;
using request_handler_t = std::function<
my_extra_data_factory::data_t>)
>;
};
std::shared_ptr< generic_request_t< Extra_Data > > generic_request_handle_t
An alias for shared-pointer to incoming request.
request_handling_status_t
Request handling status.

But this is a boring and error-prone task. So RESTinio allows a user to specify only extra_data_factory_t type and skip the definition of request_handler_t. That definition will be performed automatically.

The actual detection of request-handler type is performed by using specialization of actual_request_handler_type_detector for autodetect_request_handler_type.

Since
v.0.6.13

Definition at line 92 of file traits.hpp.


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