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

Function roundtrip_resp

nodedb-cluster/src/rpc_codec/execute.rs:153–160  ·  view source on GitHub ↗
(resp: ExecuteResponse)

Source from the content-addressed store, hash-verified

151 }
152
153 fn roundtrip_resp(resp: ExecuteResponse) -> ExecuteResponse {
154 let rpc = RaftRpc::ExecuteResponse(resp);
155 let encoded = super::super::encode(&rpc).unwrap();
156 match super::super::decode(&encoded).unwrap() {
157 RaftRpc::ExecuteResponse(r) => r,
158 other => panic!("expected ExecuteResponse, got {other:?}"),
159 }
160 }
161
162 #[test]
163 fn roundtrip_execute_request_basic() {

Calls 3

ExecuteResponseClass · 0.85
encodeFunction · 0.70
decodeFunction · 0.70