Represents a Specification for one field of an RPC command.  
 More...
#include <Specs.hpp>
 | 
| template<SomeProcessor... Processors>  | 
|   | FieldSpec (std::string const &key, Processors &&... processors) | 
|   | Construct a field specification out of a set of processors.  
  | 
| template<SomeCheck... Checks>  | 
|   | FieldSpec (std::string const &key, Checks &&... checks) | 
|   | Construct a field specification out of a set of checkers.  
  | 
| MaybeError  | process (boost::json::value &value) const | 
|   | Processes the passed JSON value using the stored processors.  
  | 
| check::Warnings  | check (boost::json::value const &value) const | 
|   | Checks the passed JSON value using the stored checkers.  
  | 
Represents a Specification for one field of an RPC command. 
 
◆ FieldSpec() [1/2]
template<SomeProcessor... Processors> 
  
  
      
        
          | rpc::FieldSpec::FieldSpec  | 
          ( | 
          std::string const & |           key,  | 
         
        
           | 
           | 
          Processors &&... |           processors ) | 
         
       
   | 
  
inline   | 
  
 
Construct a field specification out of a set of processors. 
- Template Parameters
 - 
  
    | Processors | The types of processors  | 
  
   
- Parameters
 - 
  
    | key | The key in a JSON object that the field validates  | 
    | processors | The processors, each of them have to fulfil the rpc::SomeProcessor concept  | 
  
   
 
 
◆ FieldSpec() [2/2]
template<SomeCheck... Checks> 
  
  
      
        
          | rpc::FieldSpec::FieldSpec  | 
          ( | 
          std::string const & |           key,  | 
         
        
           | 
           | 
          Checks &&... |           checks ) | 
         
       
   | 
  
inline   | 
  
 
Construct a field specification out of a set of checkers. 
- Template Parameters
 - 
  
    | Checks | The types of checkers  | 
  
   
- Parameters
 - 
  
    | key | The key in a JSON object that the field validates  | 
    | checks | The checks, each of them have to fulfil the rpc::SomeCheck concept  | 
  
   
 
 
◆ check()
  
  
      
        
          | check::Warnings rpc::FieldSpec::check  | 
          ( | 
          boost::json::value const & |           value | ) | 
           const | 
         
       
   | 
  
nodiscard   | 
  
 
Checks the passed JSON value using the stored checkers. 
- Parameters
 - 
  
    | value | The JSON value to validate  | 
  
   
- Returns
 - A vector of warnings (empty if no warnings) 
 
 
 
◆ process()
  
  
      
        
          | MaybeError rpc::FieldSpec::process  | 
          ( | 
          boost::json::value & |           value | ) | 
           const | 
         
       
   | 
  
nodiscard   | 
  
 
Processes the passed JSON value using the stored processors. 
- Parameters
 - 
  
    | value | The JSON value to validate and/or modify  | 
  
   
- Returns
 - Nothing on success; Status on error 
 
 
 
The documentation for this struct was generated from the following files:
- /__w/clio/clio/src/rpc/common/Specs.hpp
 
- /__w/clio/clio/src/rpc/common/Specs.cpp