Struct jsonrpc_rs::Response
source · pub struct Response<S, R, D>where
S: AsRef<str>,{
pub id: usize,
pub jsonrpc: Version,
pub result: Option<R>,
pub error: Option<Error<S, D>>,
}Expand description
When a rpc call is made, the Server MUST reply with a Response, except for in the case of Notifications.
visit here for details
Fields§
§id: usizeThis member is REQUIRED on error. This member MUST NOT exist if there was no error triggered during invocation.
jsonrpc: VersionA String specifying the version of the JSON-RPC protocol. MUST be exactly “2.0”.
result: Option<R>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: Option<Error<S, D>>This member is REQUIRED on error. This member MUST NOT exist if there was no error triggered during invocation.
Trait Implementations§
source§impl<'de, S, R, D> Deserialize<'de> for Response<S, R, D>where
S: AsRef<str> + Deserialize<'de>,
R: Deserialize<'de>,
D: Deserialize<'de>,
impl<'de, S, R, D> Deserialize<'de> for Response<S, R, D>where
S: AsRef<str> + Deserialize<'de>,
R: Deserialize<'de>,
D: 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