[#RPCArg] = RPCArg :mrdocs: Describes a single argument of an RPC method for validation and help text. == Synopsis Declared in `<rpc/util.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- struct RPCArg; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:RPCArg/Default.adoc[`Default`] | Default constant value | xref:RPCArg/DefaultHint.adoc[`DefaultHint`] | Hint for default value | xref:RPCArg/Fallback.adoc[`Fallback`] | The argument's default: an optionality marker, a default hint, or a default value. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:RPCArg/Optional.adoc[`Optional`] | Whether an argument is required or may be omitted. | xref:RPCArg/Type.adoc[`Type`] | The JSON type expected for the argument. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:RPCArg/2constructor-09.adoc[`RPCArg`] [.small]#[constructor]# | Constructors | xref:RPCArg/GetFirstName.adoc[`GetFirstName`] | Return the first of all aliases | xref:RPCArg/GetName.adoc[`GetName`] | Return the name, throws when there are aliases | xref:RPCArg/IsOptional.adoc[`IsOptional`] | Report whether the argument may be omitted. | xref:RPCArg/MatchesType.adoc[`MatchesType`] | Check whether the request JSON type matches. Returns true if type matches, or object describing error(s) if not. | xref:RPCArg/ToDescriptionString.adoc[`ToDescriptionString`] | Return the description string, including the argument type and whether the argument is required. | xref:RPCArg/ToString.adoc[`ToString`] | Return the type string of the argument. Set oneline to allow it to be overridden by a custom oneline type string (m_opts.oneline_description). | xref:RPCArg/ToStringObj.adoc[`ToStringObj`] | Return the type string of the argument when it is in an object (dict). Set oneline to get the oneline representation (less whitespace) |=== == Data Members [cols="1,4"] |=== | Name| Description | xref:RPCArg/m_description.adoc[`m_description`] | Human‐readable description of the argument. | xref:RPCArg/m_fallback.adoc[`m_fallback`] | Default value or optionality of the argument. | xref:RPCArg/m_inner.adoc[`m_inner`] | Only used for arrays or dicts | xref:RPCArg/m_names.adoc[`m_names`] | The name of the arg (can be empty for inner args, can contain multiple aliases separated by | for named request arguments) | xref:RPCArg/m_opts.adoc[`m_opts`] | Additional options controlling validation and rendering. | xref:RPCArg/m_type.adoc[`m_type`] | The JSON type expected for the argument. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#