MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / read_json_rpc_request_id

Function read_json_rpc_request_id

src/daemon.rs:2078–2089  ·  view source on GitHub ↗
(
    transport: &mut UnixStreamTransport,
)

Source from the content-addressed store, hash-verified

2076
2077#[cfg(unix)]
2078async fn read_json_rpc_request_id(
2079 transport: &mut UnixStreamTransport,
2080) -> Result<serde_json::Value> {
2081 let Some(line) = transport.read_line().await? else {
2082 return Ok(serde_json::Value::Null);
2083 };
2084
2085 Ok(serde_json::from_str::<JsonRpcRequest>(&line)
2086 .ok()
2087 .and_then(|request| request.id)
2088 .unwrap_or(serde_json::Value::Null))
2089}
2090
2091#[cfg(unix)]
2092async fn write_json_rpc_response(

Callers 1

write_project_open_errorFunction · 0.85

Calls 1

read_lineMethod · 0.45

Tested by

no test coverage detected