MCPcopy Create free account
hub / github.com/carsonpo/haystackdb / write_to_offset

Method write_to_offset

src/structures/mmap_tree/storage.rs:367–370  ·  view source on GitHub ↗
(&mut self, offset: usize, data: &[u8])

Source from the content-addressed store, hash-verified

365 }
366
367 fn write_to_offset(&mut self, offset: usize, data: &[u8]) {
368 self.mmap[offset..offset + data.len()].copy_from_slice(data);
369 // self.mmap.flush().unwrap();
370 }
371
372 fn read_from_offset(&self, offset: usize, len: usize) -> &[u8] {
373 &self.mmap[offset..offset + len]

Callers 3

store_nodeMethod · 0.80
set_used_spaceMethod · 0.80
set_root_offsetMethod · 0.80

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected