pub struct Response {
pub result: Option<Box<RawValue>>,
pub error: Option<RpcError>,
pub id: Value,
pub jsonrpc: Option<String>,
}
Expand description
A JSONRPC response object.
Fields§
§result: Option<Box<RawValue>>
A result if there is one, or None
.
error: Option<RpcError>
An error if there is one, or None
.
id: Value
Identifier for this response, which should match that of the request.
jsonrpc: Option<String>
jsonrpc field, MUST be “2.0”.
Implementations§
Trait Implementations§
source§impl<'de> Deserialize<'de> for Response
impl<'de> Deserialize<'de> for Response
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 RefUnwindSafe for Response
impl Send for Response
impl Sync for Response
impl Unpin for Response
impl UnwindSafe for Response
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