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

Function hash_from_extracted_field

nodedb-query/src/msgpack_scan/compare.rs:296–301  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

294
295 #[test]
296 fn hash_from_extracted_field() {
297 let buf = encode(&json!({"id": 42}));
298 let range = crate::msgpack_scan::field::extract_field(&buf, 0, "id").unwrap();
299 let h = hash_field_bytes(&buf, range);
300 assert_ne!(h, 0);
301 }
302}

Callers

nothing calls this directly

Calls 3

extract_fieldFunction · 0.85
hash_field_bytesFunction · 0.85
encodeFunction · 0.70

Tested by

no test coverage detected