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

Check if a value of a field is deprecated. More...

#include <Checkers.hpp>

Public Member Functions

 Deprecated (T val)
 Construct a new Deprecated object.
 
std::optional< Warningcheck (boost::json::value const &value, std::string_view key) const
 Check if a value of a field is deprecated.
 

Detailed Description

template<typename T>
class rpc::check::Deprecated< T >

Check if a value of a field is deprecated.

Template Parameters
TThe type of the field

Constructor & Destructor Documentation

◆ Deprecated()

template<typename T >
rpc::check::Deprecated< T >::Deprecated ( T val)
inline

Construct a new Deprecated object.

Parameters
valThe value that is deprecated

Member Function Documentation

◆ check()

template<typename T >
std::optional< Warning > rpc::check::Deprecated< T >::check ( boost::json::value const & value,
std::string_view key ) const
inlinenodiscard

Check if a value of a field is deprecated.

Parameters
valueThe json value to check
keyThe key to check
Returns
A warning if the field is deprecated or std::nullopt otherwise

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