MCPcopy Create free account
hub / github.com/GraphLite-AI/GraphLite / insert

Method insert

graphlite/src/storage/persistent/memory.rs:33–36  ·  view source on GitHub ↗
(&self, key: &[u8], value: &[u8])

Source from the content-addressed store, hash-verified

31
32impl StorageTree for MemoryTree {
33 fn insert(&self, key: &[u8], value: &[u8]) -> StorageResult<()> {
34 self.data.write().insert(key.to_vec(), value.to_vec());
35 Ok(())
36 }
37
38 fn get(&self, key: &[u8]) -> StorageResult<Option<Vec<u8>>> {
39 Ok(self.data.read().get(key).cloned())

Callers 2

batch_insertMethod · 0.45
open_treeMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected