(
&self,
id: u64,
method: &str,
params: Option<Value>,
)
| 443 | } |
| 444 | |
| 445 | async fn write_request( |
| 446 | &self, |
| 447 | id: u64, |
| 448 | method: &str, |
| 449 | params: Option<Value>, |
| 450 | ) -> Result<(), PluginSubprocessError> { |
| 451 | let request = RpcRequest::new(id, method, params); |
| 452 | let content = serde_json::to_string(&request)?; |
| 453 | let frame = format!("Content-Length: {}\r\n\r\n{}", content.len(), content); |
| 454 | |
| 455 | let mut stdin = self.stdin.lock().await; |
| 456 | stdin.write_all(frame.as_bytes()).await?; |
| 457 | stdin.flush().await?; |
| 458 | Ok(()) |
| 459 | } |
| 460 | |
| 461 | async fn read_response_for_id( |
| 462 | &self, |
no test coverage detected