pub struct JSONRPCResponse<U> {
pub json_rpc: String,
pub id: RequestId,
pub result: U,
}
Expand description
A generic JSON-RPC response.
§Type Parameters
U
: The type of theresult
field, containing response-specific data.
Fields§
§json_rpc: String
§id: RequestId
§result: U
Result object when the request completes successfully.
Trait Implementations§
Source§impl<U: Clone> Clone for JSONRPCResponse<U>
impl<U: Clone> Clone for JSONRPCResponse<U>
Source§fn clone(&self) -> JSONRPCResponse<U>
fn clone(&self) -> JSONRPCResponse<U>
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<U: Debug> Debug for JSONRPCResponse<U>
impl<U: Debug> Debug for JSONRPCResponse<U>
Source§impl<'de, U> Deserialize<'de> for JSONRPCResponse<U>where
U: Deserialize<'de>,
impl<'de, U> Deserialize<'de> for JSONRPCResponse<U>where
U: Deserialize<'de>,
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<U> Freeze for JSONRPCResponse<U>where
U: Freeze,
impl<U> RefUnwindSafe for JSONRPCResponse<U>where
U: RefUnwindSafe,
impl<U> Send for JSONRPCResponse<U>where
U: Send,
impl<U> Sync for JSONRPCResponse<U>where
U: Sync,
impl<U> Unpin for JSONRPCResponse<U>where
U: Unpin,
impl<U> UnwindSafe for JSONRPCResponse<U>where
U: UnwindSafe,
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