Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NodeDB-Lab/nodedb
/ encode
Function
encode
nodedb-query/src/msgpack_scan/compare.rs:173–175 ·
view source on GitHub ↗
(v: &serde_json::Value)
Source
from the content-addressed store, hash-verified
171
use serde_json::json;
172
173
fn encode(v: &serde_json::Value) -> Vec<u8> {
174
nodedb_types::json_msgpack::json_to_msgpack(v).expect(
"encode"
)
175
}
176
177
fn val_range(buf: &[u8]) -> (usize, usize) {
178
(0, buf.len())
Callers
12
hash_same_bytes_same_hash
Function · 0.70
hash_different_values_likely_differ
Function · 0.70
compare_integers
Function · 0.70
compare_strings
Function · 0.70
compare_cross_type_null_vs_number
Function · 0.70
compare_cross_type_string_vs_number
Function · 0.70
compare_booleans
Function · 0.70
compare_negative_integers
Function · 0.70
field_bytes_eq_works
Function · 0.70
is_field_null_works
Function · 0.70
compare_floats
Function · 0.70
hash_from_extracted_field
Function · 0.70
Calls
2
json_to_msgpack
Function · 0.50
expect
Method · 0.45
Tested by
12
hash_same_bytes_same_hash
Function · 0.56
hash_different_values_likely_differ
Function · 0.56
compare_integers
Function · 0.56
compare_strings
Function · 0.56
compare_cross_type_null_vs_number
Function · 0.56
compare_cross_type_string_vs_number
Function · 0.56
compare_booleans
Function · 0.56
compare_negative_integers
Function · 0.56
field_bytes_eq_works
Function · 0.56
is_field_null_works
Function · 0.56
compare_floats
Function · 0.56
hash_from_extracted_field
Function · 0.56