pub struct HttpJsonRpcRequest {
pub jsonrpc: String,
pub id: Option<Value>,
pub method: String,
pub params: Option<Value>,
}Expand description
Lenient JSON-RPC request for HTTP boundary parsing
This type accepts any string for jsonrpc and any JSON value for id,
allowing proper error handling when clients send non-compliant requests.
Fields§
§jsonrpc: StringJSON-RPC version (should be “2.0” but accepts any string for error handling)
id: Option<Value>Request ID (can be string, number, or null)
method: StringMethod name
params: Option<Value>Method parameters
Implementations§
Trait Implementations§
Source§impl Clone for HttpJsonRpcRequest
impl Clone for HttpJsonRpcRequest
Source§fn clone(&self) -> HttpJsonRpcRequest
fn clone(&self) -> HttpJsonRpcRequest
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HttpJsonRpcRequest
impl Debug for HttpJsonRpcRequest
Source§impl<'de> Deserialize<'de> for HttpJsonRpcRequest
impl<'de> Deserialize<'de> for HttpJsonRpcRequest
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 HttpJsonRpcRequest
impl RefUnwindSafe for HttpJsonRpcRequest
impl Send for HttpJsonRpcRequest
impl Sync for HttpJsonRpcRequest
impl Unpin for HttpJsonRpcRequest
impl UnwindSafe for HttpJsonRpcRequest
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