MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / roundtrip_req

Function roundtrip_req

nodedb-cluster/src/rpc_codec/execute.rs:144–151  ·  view source on GitHub ↗
(req: ExecuteRequest)

Source from the content-addressed store, hash-verified

142 use super::*;
143
144 fn roundtrip_req(req: ExecuteRequest) -> ExecuteRequest {
145 let rpc = RaftRpc::ExecuteRequest(req);
146 let encoded = super::super::encode(&rpc).unwrap();
147 match super::super::decode(&encoded).unwrap() {
148 RaftRpc::ExecuteRequest(r) => r,
149 other => panic!("expected ExecuteRequest, got {other:?}"),
150 }
151 }
152
153 fn roundtrip_resp(resp: ExecuteResponse) -> ExecuteResponse {
154 let rpc = RaftRpc::ExecuteResponse(resp);

Calls 3

ExecuteRequestClass · 0.85
encodeFunction · 0.70
decodeFunction · 0.70