MCPcopy Create free account
hub / github.com/ChrisFeldmeier/OpenCodeRust / new

Method new

crates/opencode-mcp/src/protocol.rs:13–20  ·  view source on GitHub ↗
(id: u64, method: impl Into<String>)

Source from the content-addressed store, hash-verified

11
12impl JsonRpcRequest {
13 pub fn new(id: u64, method: impl Into<String>) -> Self {
14 Self {
15 jsonrpc: "2.0".to_string(),
16 id,
17 method: method.into(),
18 params: None,
19 }
20 }
21
22 pub fn with_params(mut self, params: serde_json::Value) -> Self {
23 self.params = Some(params);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected