RESTinio
|
Namespaces | |
namespace | impl |
Classes | |
class | async_handling_controller_t |
Interface of a controller of an async chan. More... | |
class | fixed_size_chain_t |
A holder of fixed-size chain of asynchronous handlers. More... | |
class | growable_size_chain_t |
A holder of variable-size chain of asynchronous handlers. More... | |
struct | no_more_schedulers_t |
Special type to be used as an indicator that there are no more schedulers in an async chain. More... | |
Typedefs | |
template<typename Extra_Data_Factory = no_extra_data_factory_t> | |
using | unique_async_handling_controller_t |
Short alias for unique_ptr to async_handling_controller. | |
template<typename Extra_Data_Factory = no_extra_data_factory_t> | |
using | generic_async_request_scheduler_t |
Short alias for a type of a scheduler to be used in async chains. | |
template<typename Extra_Data_Factory = no_extra_data_factory_t> | |
using | on_next_result_t |
Special type to be used as result of async_handling_controller's on_next method. | |
Enumerations | |
enum class | schedule_result_t { ok , failure } |
Type for return value of a scheduler in a chain. More... | |
Functions | |
constexpr schedule_result_t | ok () noexcept |
Helper function to be used if scheduling was successful. | |
constexpr schedule_result_t | failure () noexcept |
Helper function to be used if scheduling failed. | |
template<typename Extra_Data_Factory > | |
void | next (unique_async_handling_controller_t< Extra_Data_Factory > controller) |
Command to try to switch to the next handler in an async chain. | |
using restinio::async_chain::generic_async_request_scheduler_t |
Short alias for a type of a scheduler to be used in async chains.
Definition at line 93 of file common.hpp.
using restinio::async_chain::on_next_result_t |
Special type to be used as result of async_handling_controller's on_next method.
The async_handling_controller_t::on_next may return an actual scheduler to be called or (if there are no more handlers left) a special no_more_handler value. This is described by on_next_result_t variant type.
Definition at line 119 of file common.hpp.
using restinio::async_chain::unique_async_handling_controller_t |
Short alias for unique_ptr to async_handling_controller.
Definition at line 84 of file common.hpp.
Type for return value of a scheduler in a chain.
A scheduler should schedule the actual processing of a request and should tell whether this scheduling was successful or not. If it was successful, schedule_result_t::ok must be returned, otherwise the schedule_result_t::failure must be returned.
Enumerator | |
---|---|
ok | The scheduling of the actual processing was successful. |
failure | The scheduling of the actual processing failed. Note, that there is no additional information about the failure. |
Definition at line 24 of file common.hpp.
|
inlineconstexprnoexcept |
Helper function to be used if scheduling failed.
Usage example:
Definition at line 72 of file common.hpp.
void restinio::async_chain::next | ( | unique_async_handling_controller_t< Extra_Data_Factory > | controller | ) |
Command to try to switch to the next handler in an async chain.
If an intermediate handler in an async chain doesn't complete processing of the request it should call next() function to activate the next handler in the chain.
If there are no more handlers in the chain the processing of the request will be finished just inside the next() call by generating negative response.
Definition at line 327 of file common.hpp.
|
inlineconstexprnoexcept |
Helper function to be used if scheduling was successful.
Usage example:
Definition at line 49 of file common.hpp.