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

Function encode

nodedb-query/src/msgpack_scan/field.rs:88–90  ·  view source on GitHub ↗
(v: &serde_json::Value)

Source from the content-addressed store, hash-verified

86 use serde_json::json;
87
88 fn encode(v: &serde_json::Value) -> Vec<u8> {
89 nodedb_types::json_msgpack::json_to_msgpack(v).expect("encode")
90 }
91
92 #[test]
93 fn extract_integer_field() {

Callers 15

extract_integer_fieldFunction · 0.70
extract_string_fieldFunction · 0.70
extract_float_fieldFunction · 0.70
extract_missing_fieldFunction · 0.70
extract_multiple_fieldsFunction · 0.70
extract_nested_pathFunction · 0.70
extract_dot_path_worksFunction · 0.70
extract_empty_pathFunction · 0.70
extract_from_large_mapFunction · 0.70
fuzz_truncated_buffersFunction · 0.70

Calls 2

json_to_msgpackFunction · 0.50
expectMethod · 0.45

Tested by 15

extract_integer_fieldFunction · 0.56
extract_string_fieldFunction · 0.56
extract_float_fieldFunction · 0.56
extract_missing_fieldFunction · 0.56
extract_multiple_fieldsFunction · 0.56
extract_nested_pathFunction · 0.56
extract_dot_path_worksFunction · 0.56
extract_empty_pathFunction · 0.56
extract_from_large_mapFunction · 0.56
fuzz_truncated_buffersFunction · 0.56