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

Function extracts_from_json_payload

nodedb/src/event/bitemporal_extract.rs:93–102  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91
92 #[test]
93 fn extracts_from_json_payload() {
94 let bytes = serde_json::to_vec(&serde_json::json!({
95 "_ts_system": 42_i64,
96 "_ts_valid_from": 7_i64,
97 }))
98 .unwrap();
99 let (sys, valid) = extract_stamps(Some(&bytes));
100 assert_eq!(sys, Some(42));
101 assert_eq!(valid, Some(7));
102 }
103}

Callers

nothing calls this directly

Calls 1

extract_stampsFunction · 0.85

Tested by

no test coverage detected