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

Function parse_get_command

nodedb/src/control/server/resp/command.rs:70–79  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

68
69 #[test]
70 fn parse_get_command() {
71 let value = RespValue::array(vec![
72 RespValue::bulk_str("get"),
73 RespValue::bulk_str("mykey"),
74 ]);
75 let cmd = RespCommand::parse(&value).unwrap();
76 assert_eq!(cmd.name, "GET");
77 assert_eq!(cmd.arg(0), Some(b"mykey".as_slice()));
78 assert_eq!(cmd.argc(), 1);
79 }
80
81 #[test]
82 fn parse_set_with_ex() {

Callers

nothing calls this directly

Calls 2

arrayFunction · 0.85
parseFunction · 0.50

Tested by

no test coverage detected