Creates a request message.
(
id: u64,
method: impl Into<String>,
params: Option<serde_json::Value>,
)
| 149 | |
| 150 | /// Creates a request message. |
| 151 | pub fn create_request( |
| 152 | id: u64, |
| 153 | method: impl Into<String>, |
| 154 | params: Option<serde_json::Value>, |
| 155 | ) -> JsonRpcMessage { |
| 156 | JsonRpcMessage::Request(JsonRpcRequest { |
| 157 | jsonrpc: "2.0".to_string(), |
| 158 | id, |
| 159 | method: method.into(), |
| 160 | params, |
| 161 | }) |
| 162 | } |
| 163 | |
| 164 | /// Creates a notification message. |
| 165 | pub fn create_notification( |