pub struct Request {
pub jsonrpc: String,
pub id: Value,
pub method: String,
pub params: Option<Value>,
}
Expand description
Request represents a JSON-RPC request message. It includes the JSON-RPC version, an identifier for the request, the method to be invoked, and optional parameters.
Fields§
§jsonrpc: String
JSON-RPC version, typically “2.0”.
id: Value
Unique identifier for the request, can be a number or a string.
method: String
The name of the method to be invoked.
params: Option<Value>
Optional parameters for the method.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Request
impl<'de> Deserialize<'de> for Request
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
Auto Trait Implementations§
impl Freeze for Request
impl RefUnwindSafe for Request
impl Send for Request
impl Sync for Request
impl Unpin for Request
impl UnwindSafe for Request
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