pub enum JSONRPCMessage {
Request(JSONRPCRequest),
Notification(JSONRPCNotification),
Response(JSONRPCResponse),
Error(JSONRPCError),
BatchRequest(Vec<JSONRPCBatchRequestItem>),
BatchResponse(Vec<JSONRPCBatchResponseItem>),
}
Expand description
A JSON-RPC message that can be sent or received.
Variants§
Request(JSONRPCRequest)
A request that expects a response
Notification(JSONRPCNotification)
A notification that does not expect a response
Response(JSONRPCResponse)
A successful response to a request
Error(JSONRPCError)
An error response to a request
BatchRequest(Vec<JSONRPCBatchRequestItem>)
A batch of requests and/or notifications
BatchResponse(Vec<JSONRPCBatchResponseItem>)
A batch of responses and/or errors
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