Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
rpc::validation::NotSupported< T > Class Template Referencefinal

A specialized NotSupported validator that forbids a field to be present when the value equals the given value. More...

#include <Validators.hpp>

Public Member Functions

 NotSupported (T val)
 Constructs a new NotSupported validator.
 
MaybeError verify (boost::json::value const &value, std::string_view key) const
 Verify whether the field is supported or not.
 

Detailed Description

template<typename T>
class rpc::validation::NotSupported< T >

A specialized NotSupported validator that forbids a field to be present when the value equals the given value.

Constructor & Destructor Documentation

◆ NotSupported()

template<typename T >
rpc::validation::NotSupported< T >::NotSupported ( T val)
inline

Constructs a new NotSupported validator.

Parameters
valThe value to store and verify against

Member Function Documentation

◆ verify()

template<typename T >
MaybeError rpc::validation::NotSupported< T >::verify ( boost::json::value const & value,
std::string_view key ) const
inlinenodiscard

Verify whether the field is supported or not.

Parameters
valueThe JSON value representing the outer object
keyThe key used to retrieve the tested value from the outer object
Returns
RippledError::rpcNOT_SUPPORTED if the value matched; otherwise no error is returned

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