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

Function extract_integer_field

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

Source from the content-addressed store, hash-verified

91
92 #[test]
93 fn extract_integer_field() {
94 let buf = encode(&json!({"age": 25}));
95 let (start, _end) = extract_field(&buf, 0, "age").unwrap();
96 assert_eq!(read_i64(&buf, start), Some(25));
97 }
98
99 #[test]
100 fn extract_string_field() {

Callers

nothing calls this directly

Calls 2

extract_fieldFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected