pub struct JsonRpcRequest {
pub id: RequestId,
pub method: String,
pub params: Option<Value>,
pub jsonrpc: JsonRpcVersion,
}
Expand description
Represents a JSON-RPC request.
A request is a message that expects a response with the same ID.
Fields§
§id: RequestId
The request ID, used to match with the response
method: String
The method name to call
params: Option<Value>
Optional parameters for the method
jsonrpc: JsonRpcVersion
The JSON-RPC version
Trait Implementations§
Source§impl Clone for JsonRpcRequest
impl Clone for JsonRpcRequest
Source§fn clone(&self) -> JsonRpcRequest
fn clone(&self) -> JsonRpcRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for JsonRpcRequest
impl Debug for JsonRpcRequest
Source§impl Default for JsonRpcRequest
impl Default for JsonRpcRequest
Source§fn default() -> JsonRpcRequest
fn default() -> JsonRpcRequest
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for JsonRpcRequest
impl<'de> Deserialize<'de> for JsonRpcRequest
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for JsonRpcRequest
impl PartialEq for JsonRpcRequest
Source§impl Serialize for JsonRpcRequest
impl Serialize for JsonRpcRequest
impl Eq for JsonRpcRequest
impl StructuralPartialEq for JsonRpcRequest
Auto Trait Implementations§
impl Freeze for JsonRpcRequest
impl RefUnwindSafe for JsonRpcRequest
impl Send for JsonRpcRequest
impl Sync for JsonRpcRequest
impl Unpin for JsonRpcRequest
impl UnwindSafe for JsonRpcRequest
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more