pub enum JSONRPCMessage {
JSONRPCRequest(JSONRPCRequest),
JSONRPCNotification(JSONRPCNotification),
JSONRPCBatchRequest(JSONRPCBatchRequest),
JSONRPCResponse(JSONRPCResponse),
JSONRPCError(JSONRPCError),
JSONRPCBatchResponse(JSONRPCBatchResponse),
}
Expand description
Refers to any valid JSON-RPC object that can be decoded off the wire, or encoded to be sent.
Variants§
JSONRPCRequest(JSONRPCRequest)
A request that expects a response.
JSONRPCNotification(JSONRPCNotification)
A notification which does not expect a response.
JSONRPCBatchRequest(JSONRPCBatchRequest)
A JSON-RPC batch request, as described in https://www.jsonrpc.org/specification#batch.
JSONRPCResponse(JSONRPCResponse)
A successful (non-error) response to a request.
JSONRPCError(JSONRPCError)
A response to a request that indicates an error occurred.
JSONRPCBatchResponse(JSONRPCBatchResponse)
A JSON-RPC batch response, as described in https://www.jsonrpc.org/specification#batch.
Trait Implementations§
Source§impl Clone for JSONRPCMessage
impl Clone for JSONRPCMessage
Source§fn clone(&self) -> JSONRPCMessage
fn clone(&self) -> JSONRPCMessage
Returns a copy 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 JSONRPCMessage
impl Debug for JSONRPCMessage
Source§impl<'de> Deserialize<'de> for JSONRPCMessage
impl<'de> Deserialize<'de> for JSONRPCMessage
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 JSONRPCMessage
impl PartialEq for JSONRPCMessage
Source§impl Serialize for JSONRPCMessage
impl Serialize for JSONRPCMessage
impl StructuralPartialEq for JSONRPCMessage
Auto Trait Implementations§
impl Freeze for JSONRPCMessage
impl RefUnwindSafe for JSONRPCMessage
impl Send for JSONRPCMessage
impl Sync for JSONRPCMessage
impl Unpin for JSONRPCMessage
impl UnwindSafe for JSONRPCMessage
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