[#RPCArg]
= RPCArg
:mrdocs:

Describes a single argument of an RPC method for validation and help text&period;

== Synopsis

Declared in `&lt;rpc&sol;util&period;h&gt;`

[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&apos;s default&colon; an optionality marker, a default hint, or a default value&period;
|===


== Enums

[cols="1,4"]
|===
| Name| Description
| xref:RPCArg/Optional.adoc[`Optional`] 
| Whether an argument is required or may be omitted&period;
| xref:RPCArg/Type.adoc[`Type`] 
| The JSON type expected for the argument&period;
|===


== 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&period;
| xref:RPCArg/MatchesType.adoc[`MatchesType`] 
| Check whether the request JSON type matches&period; Returns true if type matches, or object describing error(s) if not&period;
| xref:RPCArg/ToDescriptionString.adoc[`ToDescriptionString`] 
| Return the description string, including the argument type and whether the argument is required&period;
| xref:RPCArg/ToString.adoc[`ToString`] 
| Return the type string of the argument&period; Set oneline to allow it to be overridden by a custom oneline type string (m&lowbar;opts&period;oneline&lowbar;description)&period;
| xref:RPCArg/ToStringObj.adoc[`ToStringObj`] 
| Return the type string of the argument when it is in an object (dict)&period; Set oneline to get the oneline representation (less whitespace)
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:RPCArg/m_description.adoc[`m&lowbar;description`] 
| Human&hyphen;readable description of the argument&period;
| xref:RPCArg/m_fallback.adoc[`m&lowbar;fallback`] 
| Default value or optionality of the argument&period;
| xref:RPCArg/m_inner.adoc[`m&lowbar;inner`] 
| Only used for arrays or dicts
| xref:RPCArg/m_names.adoc[`m&lowbar;names`] 
| The name of the arg (can be empty for inner args, can contain multiple aliases separated by &verbar; for named request arguments)
| xref:RPCArg/m_opts.adoc[`m&lowbar;opts`] 
| Additional options controlling validation and rendering&period;
| xref:RPCArg/m_type.adoc[`m&lowbar;type`] 
| The JSON type expected for the argument&period;
|===



[.small]#Created with https://www.mrdocs.com[MrDocs]#
