A meta-processor that specifies a list of requirements to run against when the type matches the template parameter.
More...
#include <MetaProcessors.hpp>
|
template<SomeRequirement... Requirements> |
| IfType (Requirements &&... requirements) |
| Constructs a validator that validates the specs if the type matches.
|
|
| IfType (IfType const &)=default |
|
| IfType (IfType &&)=default |
|
MaybeError | verify (boost::json::value &value, std::string_view key) const |
| Verify that the element is valid according to the stored requirements when type matches.
|
|
template<typename Type>
class rpc::meta::IfType< Type >
A meta-processor that specifies a list of requirements to run against when the type matches the template parameter.
◆ IfType()
template<typename Type >
template<SomeRequirement... Requirements>
Constructs a validator that validates the specs if the type matches.
- Parameters
-
requirements | The requirements to validate against |
◆ verify()
Verify that the element is valid according to the stored requirements when type matches.
- Parameters
-
value | The JSON value representing the outer object |
key | The key used to retrieve the element from the outer object |
- Returns
- Possibly an error
The documentation for this class was generated from the following file: