Struct ez_jsonrpc_types::Response
source · pub struct Response<T = Value, E = Value> {
pub result: Result<T, Error<E>>,
pub id: Id,
}
Expand description
A JSON-RPC 2.0
response object.
Note that the "jsonrpc": "2.0"
member is transparently checked during
deserialization, and added during serialization.
Fields§
§result: Result<T, Error<E>>
“result”:
This member is REQUIRED on success. This member MUST NOT exist if there was an error invoking the method. The value of this member is determined by the method invoked on the Server.
“error”:
This member is REQUIRED on error. This member MUST NOT exist if there was no error triggered during invocation.
id: Id
This member is REQUIRED. It MUST be the same as the value of the id member in the Request Object. If there was an error in detecting the id in the Request object (e.g. Parse error/Invalid Request), it MUST be Null.
Trait Implementations§
source§impl<'de, T, E> Deserialize<'de> for Response<T, E>where
T: Deserialize<'de>,
E: Deserialize<'de>,
impl<'de, T, E> Deserialize<'de> for Response<T, E>where
T: Deserialize<'de>,
E: 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
source§impl<T: PartialEq, E: PartialEq> PartialEq for Response<T, E>
impl<T: PartialEq, E: PartialEq> PartialEq for Response<T, E>
impl<T: Eq, E: Eq> Eq for Response<T, E>
impl<T, E> StructuralPartialEq for Response<T, E>
Auto Trait Implementations§
impl<T, E> Freeze for Response<T, E>
impl<T, E> RefUnwindSafe for Response<T, E>where
T: RefUnwindSafe,
E: RefUnwindSafe,
impl<T, E> Send for Response<T, E>
impl<T, E> Sync for Response<T, E>
impl<T, E> Unpin for Response<T, E>
impl<T, E> UnwindSafe for Response<T, E>where
T: UnwindSafe,
E: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)