rpc_err

Function rpc_err 

Source
pub fn rpc_err<S: Serialize>(
    code: i32,
    msg: impl Into<String>,
    data: Option<S>,
) -> ErrorObjectOwned
Expand description

Constructs a JSON-RPC error, consisting of code, message and optional data.