MCPcopy Create free account
hub / github.com/cosdata/cosdata / with_value

Method with_value

src/models/common.rs:647–654  ·  view source on GitHub ↗
(&self, k: &K, f: F)

Source from the content-addressed store, hash-verified

645 }
646
647 pub fn with_value<F, R>(&self, k: &K, f: F) -> Option<R>
648 where
649 F: FnOnce(&V) -> R,
650 {
651 let index = self.hash_key(k);
652 let ht = self.hash_table_list[index].lock().unwrap();
653 ht.get(k).map(f)
654 }
655
656 pub fn with_value_mut<F, R>(&self, k: &K, f: F) -> Option<R>
657 where

Callers 6

deleteMethod · 0.80
sequential_searchMethod · 0.80
usv_searchMethod · 0.80
deleteMethod · 0.80
serializeMethod · 0.80
serializeMethod · 0.80

Calls 2

hash_keyMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected