pub struct Response {
pub request_seq: i64,
pub success: bool,
pub message: Option<String>,
pub body: Option<Value>,
}Expand description
Represents response to the client.
The command field (which is a string) is used as a tag in the ResponseBody enum, so users of this crate will control it by selecting the appropriate enum variant for the body.
There is also no separate ErrorResponse struct. Instead, Error is just a
variant of the ResponseBody enum.
Specification: Response
Fields§
§request_seq: i64Sequence number of the corresponding request.
success: boolOutcome of the request.
If true, the request was successful and the body attribute may contain
the result of the request.
If the value is false, the attribute message contains the error in
short form and the body may contain additional information (see
ErrorResponse.body.error).
message: Option<String>Contains the raw error in short form if success is false.
This raw error might be interpreted by the client and is not shown in
the UI.
Some predefined values exist.
Values:
‘cancelled’: request was cancelled.
etc.
body: Option<Value>Contains request result if success is true and error details if success is false.