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

Function extract_string_field

nodedb-query/src/msgpack_scan/field.rs:100–104  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

98
99 #[test]
100 fn extract_string_field() {
101 let buf = encode(&json!({"name": "alice"}));
102 let (start, _end) = extract_field(&buf, 0, "name").unwrap();
103 assert_eq!(read_str(&buf, start), Some("alice"));
104 }
105
106 #[test]
107 fn extract_float_field() {

Callers

nothing calls this directly

Calls 2

extract_fieldFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected