A rule that can change its parameters during runtime. More...
Public Types | |
using | self_t = DynamicRule |
Public Member Functions | |
DynamicRule (std::string rule) | |
void | validate () override |
void | handle (request &req, response &res, const routing_params ¶ms) override |
template<typename Func > | |
void | operator() (Func f) |
template<typename Func , unsigned... Indices> | |
std::function< void(request &, response &, const routing_params &)> | wrap (Func f, black_magic::seq< Indices... >) |
template<typename Func > | |
void | operator() (std::string name, Func &&f) |
std::unique_ptr< BaseRule > | upgrade () |
virtual void | handle_upgrade (const request &, response &res, SocketAdaptor &&) |
uint32_t | get_methods () |
template<typename F > | |
void | foreach_method (F f) |
const std::string & | rule () |
WebSocketRule & | websocket () |
self_t & | name (std::string name) noexcept |
self_t & | methods (HTTPMethod method) |
self_t & | methods (HTTPMethod method, MethodArgs... args_method) |
Public Attributes | |
std::string | custom_templates_base |
Protected Attributes | |
uint32_t | methods_ {1 << static_cast<int>(HTTPMethod::Get)} |
std::string | rule_ |
std::string | name_ |
std::unique_ptr< BaseRule > | rule_to_upgrade_ |
Private Attributes | |
std::function< void(request &, response &, const routing_params &)> | erased_handler_ |
A rule that can change its parameters during runtime.
|
inherited |
|
inline |
|
inlineoverridevirtual |
Implements crow::BaseRule.
|
inline |
|
inline |
|
inline |
|
inlineinherited |
|
inlinevirtualinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlinenoexceptinherited |
|
inlineinherited |
|
inlineinherited |
|
private |
|
inherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |