#include <util.h>
|
enum class | Type {
OBJ
, ARR
, STR
, NUM
,
BOOL
, NONE
, ANY
, STR_AMOUNT
,
STR_HEX
, OBJ_DYN
, ARR_FIXED
, NUM_TIME
,
ELISION
} |
|
|
| RPCResult (std::string cond, Type type, std::string key_name, bool optional, std::string description, std::vector< RPCResult > inner={}) |
|
| RPCResult (std::string cond, Type type, std::string key_name, std::string description, std::vector< RPCResult > inner={}) |
|
| RPCResult (Type type, std::string key_name, bool optional, std::string description, std::vector< RPCResult > inner={}, bool skip_type_check=false) |
|
| RPCResult (Type type, std::string key_name, std::string description, std::vector< RPCResult > inner={}, bool skip_type_check=false) |
|
void | ToSections (Sections §ions, OuterType outer_type=OuterType::NONE, const int current_indent=0) const |
| Append the sections of the result.
|
|
std::string | ToStringObj () const |
| Return the type string of the result when it is in an object (dict).
|
|
std::string | ToDescriptionString () const |
| Return the description string, including the result type.
|
|
UniValue | MatchesType (const UniValue &result) const |
| Check whether the result JSON type matches.
|
|
Definition at line 263 of file util.h.
◆ Type
Enumerator |
---|
OBJ | |
ARR | |
STR | |
NUM | |
BOOL | |
NONE | |
ANY | Special type to disable type checks (for testing only)
|
STR_AMOUNT | Special string to represent a floating point amount.
|
STR_HEX | Special string with only hex chars.
|
OBJ_DYN | Special dictionary with keys that are not literals.
|
ARR_FIXED | Special array that has a fixed number of entries.
|
NUM_TIME | Special numeric to denote unix epoch time.
|
ELISION | Special type to denote elision (...)
|
Definition at line 264 of file util.h.
◆ RPCResult() [1/4]
RPCResult::RPCResult |
( |
std::string |
cond, |
|
|
Type |
type, |
|
|
std::string |
key_name, |
|
|
bool |
optional, |
|
|
std::string |
description, |
|
|
std::vector< RPCResult > |
inner = {} |
|
) |
| |
|
inline |
◆ RPCResult() [2/4]
RPCResult::RPCResult |
( |
std::string |
cond, |
|
|
Type |
type, |
|
|
std::string |
key_name, |
|
|
std::string |
description, |
|
|
std::vector< RPCResult > |
inner = {} |
|
) |
| |
|
inline |
◆ RPCResult() [3/4]
RPCResult::RPCResult |
( |
Type |
type, |
|
|
std::string |
key_name, |
|
|
bool |
optional, |
|
|
std::string |
description, |
|
|
std::vector< RPCResult > |
inner = {} , |
|
|
bool |
skip_type_check = false |
|
) |
| |
|
inline |
◆ RPCResult() [4/4]
RPCResult::RPCResult |
( |
Type |
type, |
|
|
std::string |
key_name, |
|
|
std::string |
description, |
|
|
std::vector< RPCResult > |
inner = {} , |
|
|
bool |
skip_type_check = false |
|
) |
| |
|
inline |
◆ CheckInnerDoc()
void RPCResult::CheckInnerDoc |
( |
| ) |
const |
|
private |
◆ MatchesType()
Check whether the result JSON type matches.
Returns true if type matches, or object describing error(s) if not.
Definition at line 1072 of file util.cpp.
◆ ToDescriptionString()
std::string RPCResult::ToDescriptionString |
( |
| ) |
const |
Return the description string, including the result type.
◆ ToSections()
Append the sections of the result.
Definition at line 924 of file util.cpp.
◆ ToStringObj()
std::string RPCResult::ToStringObj |
( |
| ) |
const |
Return the type string of the result when it is in an object (dict).
◆ m_cond
const std::string RPCResult::m_cond |
◆ m_description
const std::string RPCResult::m_description |
◆ m_inner
const std::vector<RPCResult> RPCResult::m_inner |
Only used for arrays or dicts.
Definition at line 282 of file util.h.
◆ m_key_name
const std::string RPCResult::m_key_name |
Only used for dicts.
Definition at line 281 of file util.h.
◆ m_optional
const bool RPCResult::m_optional |
◆ m_skip_type_check
const bool RPCResult::m_skip_type_check |
◆ m_type
const Type RPCResult::m_type |
The documentation for this struct was generated from the following files: