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

Function parse_set_command

nodedb/src/control/server/resp/codec.rs:405–416  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

403
404 #[test]
405 fn parse_set_command() {
406 let mut parser = RespParser::new();
407 parser.feed(b"*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\nbar\r\n");
408
409 let result = parser.try_parse().unwrap().unwrap();
410 match result {
411 RespValue::Array(Some(items)) => {
412 assert_eq!(items.len(), 3);
413 }
414 other => panic!("expected array, got {other:?}"),
415 }
416 }
417
418 #[test]
419 fn parse_incomplete_returns_none() {

Callers

nothing calls this directly

Calls 2

try_parseMethod · 0.80
feedMethod · 0.45

Tested by

no test coverage detected