RPCResult::RPCResult

Constructors

Synopses

Declared in <rpc/util.h>

Copy with replacement options, for stamping new opts onto an existing result.

RPCResult(
    RPCResult const& other,
    RPCResultOptions opts);
» more...

Construct an unconditional, non-optional result field.

RPCResult(
    Type type,
    std::string m_key_name,
    std::string description,
    std::vector<RPCResult> inner = {},
    RPCResultOptions opts = {});
» more...

Construct an unconditional result field.

RPCResult(
    Type type,
    std::string m_key_name,
    bool optional,
    std::string description,
    std::vector<RPCResult> inner = {},
    RPCResultOptions opts = {});
» more...

Construct a conditional, non-optional result field.

RPCResult(
    std::string cond,
    Type type,
    std::string m_key_name,
    std::string description,
    std::vector<RPCResult> inner = {},
    RPCResultOptions opts = {});
» more...

Construct a conditional result field.

RPCResult(
    std::string cond,
    Type type,
    std::string m_key_name,
    bool optional,
    std::string description,
    std::vector<RPCResult> inner = {},
    RPCResultOptions opts = {});
» more...

Parameters

NameDescription
otherThe result to copy.
optsThe options to apply to the copy.
typeThe JSON type of the field.
m_key_nameThe field's key name (for object members).
descriptionHuman-readable description of the field.
innerThe nested fields for arrays or objects.
optionalWhether the field may be absent.
condCondition under which the field is present.