[#RPCMethod]
= RPCMethod
:mrdocs:

Describes an RPC method&colon; its name, arguments, results, examples, and handler&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class RPCMethod;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:RPCMethod/RPCMethodImpl.adoc[`RPCMethodImpl`] 
| The type of a function implementing an RPC method&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:RPCMethod/2constructor-02.adoc[`RPCMethod`]         [.small]#[constructor]#
| Constructors
| xref:RPCMethod/Arg.adoc[`Arg`] 
| Helper to get a required or default&hyphen;valued request argument&period;
| xref:RPCMethod/GetArgMap.adoc[`GetArgMap`] 
| Return the named args that need to be converted from string to another JSON type
| xref:RPCMethod/GetArgNames.adoc[`GetArgNames`] 
| Return list of arguments and whether they are named&hyphen;only&period;
| xref:RPCMethod/GetArgs.adoc[`GetArgs`] 
| Return the method&apos;s arguments&period;
| xref:RPCMethod/GetDescription.adoc[`GetDescription`] 
| Return the method description&period;
| xref:RPCMethod/GetResults.adoc[`GetResults`] 
| Return the method&apos;s results&period;
| xref:RPCMethod/HandleRequest.adoc[`HandleRequest`] 
| Validate the request and dispatch it to the method&apos;s implementation&period;
| xref:RPCMethod/IsValidNumArgs.adoc[`IsValidNumArgs`] 
| If the supplied number of args is neither too small nor too high
| xref:RPCMethod/MaybeArg.adoc[`MaybeArg`] 
| Helper to get an optional request argument&period;
| xref:RPCMethod/ToString.adoc[`ToString`] 
| Return the rendered help text for the method&period;
|===


== Data Members

[cols="1,4"]
|===
| Name| Description
| xref:RPCMethod/m_name.adoc[`m&lowbar;name`] 
| The method name&period;
|===



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