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

Function plain_backing_is_send_sync

nodedb-vector/src/segment_backing/plain.rs:169–178  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

167 /// Compile-time proof that `PlainMmapBacking` satisfies `Send + Sync`.
168 #[test]
169 fn plain_backing_is_send_sync() {
170 fn assert_send_sync<T: Send + Sync>(_: &T) {}
171
172 let dir = tempdir().unwrap();
173 let path = dir.path().join("check.ndvs");
174 let seg = MmapVectorSegment::create(&path, 2, &[&[1.0_f32, 2.0]]).unwrap();
175 let backing = PlainMmapBacking::new(seg);
176
177 assert_send_sync(&backing);
178 }
179
180 #[test]
181 fn plain_backing_out_of_bounds_returns_none() {

Callers

nothing calls this directly

Calls 4

joinMethod · 0.80
assert_send_syncFunction · 0.70
createFunction · 0.50
pathMethod · 0.45

Tested by

no test coverage detected