pub struct RpcResponse {
jsonrpc: Version,
id: Option<Id>,
result: ResponseResult,
}
Expand description
Response of a single rpc call
Fields§
§jsonrpc: Version
§id: Option<Id>
§result: ResponseResult
Implementations§
Source§impl RpcResponse
impl RpcResponse
pub fn new(id: Id, content: impl Into<ResponseResult>) -> Self
pub fn invalid_request(id: Id) -> Self
Trait Implementations§
Source§impl Clone for RpcResponse
impl Clone for RpcResponse
Source§fn clone(&self) -> RpcResponse
fn clone(&self) -> RpcResponse
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 RpcResponse
impl Debug for RpcResponse
Source§impl<'de> Deserialize<'de> for RpcResponse
impl<'de> Deserialize<'de> for RpcResponse
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 From<RpcError> for RpcResponse
impl From<RpcError> for RpcResponse
Source§impl From<RpcResponse> for Response
impl From<RpcResponse> for Response
Source§fn from(resp: RpcResponse) -> Self
fn from(resp: RpcResponse) -> Self
Converts to this type from the input type.
Source§impl PartialEq for RpcResponse
impl PartialEq for RpcResponse
Source§impl Serialize for RpcResponse
impl Serialize for RpcResponse
impl Eq for RpcResponse
impl StructuralPartialEq for RpcResponse
Auto Trait Implementations§
impl Freeze for RpcResponse
impl RefUnwindSafe for RpcResponse
impl Send for RpcResponse
impl Sync for RpcResponse
impl Unpin for RpcResponse
impl UnwindSafe for RpcResponse
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 136 bytes