Struct Request Copy item path Source pub struct Request<MethodT = String , IdT = Id , RequestParametersT = RequestParameters <Value >> {
pub method: MethodT,
pub params: Option <RequestParametersT>,
pub id: Option <IdT>,
}Expand description A JSON-RPC 2.0 request object.
Note that the "jsonrpc": "2.0" member is transparently checked during
deserialization, and added during serialization.
A String containing the name of the method to be invoked.
Method names that begin with the word rpc followed by a period character
(U+002E or ASCII 46) are reserved for rpc-internal methods and extensions
and MUST NOT be used for anything else.
A Structured value that holds the parameter values to be used during the
invocation of the method.
This member MAY be omitted.
An identifier established by the Client that MUST contain a String,
Number, or NULL value if included.
If it is not included it is assumed to be a notification.
The value SHOULD normally not be Null and Numbers SHOULD NOT contain fractional parts
Performs copy-assignment from
source.
Read more Formats the value using the given formatter.
Read more Returns the “default value” for a type.
Read more Deserialize this value from the given Serde deserializer.
Read more Tests for self and other values to be equal, and is used by ==.
Tests for !=. The default implementation is almost always sufficient,
and should not be overridden without very good reason.
Serialize this value into the given Serde serializer.
Read more Immutably borrows from an owned value.
Read more Mutably borrows from an owned value.
Read more 🔬 This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from
self to
dest.
Read more Returns the argument unchanged.
Calls U::from(self).
That is, this conversion is whatever the implementation of
From <T> for U chooses to do.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning.
Read more Uses borrowed data to replace owned data, usually by cloning.
Read more The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.