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

Function extract_dot_path

nodedb-query/src/msgpack_scan/field.rs:77–80  ·  view source on GitHub ↗

Extract a value using a dot-separated path string (e.g., `"address.city"`). Convenience wrapper over `extract_path`.

(buf: &[u8], offset: usize, dot_path: &str)

Source from the content-addressed store, hash-verified

75/// Extract a value using a dot-separated path string (e.g., `"address.city"`).
76/// Convenience wrapper over `extract_path`.
77pub fn extract_dot_path(buf: &[u8], offset: usize, dot_path: &str) -> Option<FieldRange> {
78 let segments: Vec<&str> = dot_path.split('.').collect();
79 extract_path(buf, offset, &segments)
80}
81
82#[cfg(test)]
83mod tests {

Callers 3

extract_dot_path_worksFunction · 0.85
fuzz_truncated_buffersFunction · 0.85
fuzz_random_payloadsFunction · 0.85

Calls 2

extract_pathFunction · 0.85
collectMethod · 0.80

Tested by 3

extract_dot_path_worksFunction · 0.68
fuzz_truncated_buffersFunction · 0.68
fuzz_random_payloadsFunction · 0.68