Skip to main content

Response

Type Alias Response 

Source
pub type Response<Result> = Response<Result, Error>;
Available on crate feature unstable_protocol_v2 only.
Expand description

JSON-RPC response envelope using this protocol version’s error type.

Aliased Type§

pub enum Response<Result> {
    Result {
        id: RequestId,
        result: Result,
    },
    Error {
        id: RequestId,
        error: Error,
    },
}

Variants§

§

Result

A successful JSON-RPC response.

Fields

§id: RequestId

The id of the request this response answers.

§result: Result

Method-specific response data.

§

Error

A failed JSON-RPC response.

Fields

§id: RequestId

The id of the request this response answers.

§error: Error

Method-specific error data.