MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / get_change

Method get_change

atomic-core/src/change/store.rs:442–449  ·  view source on GitHub ↗
(&self, hash: &Hash)

Source from the content-addressed store, hash-verified

440 type Error = MemoryStoreError;
441
442 fn get_change(&self, hash: &Hash) -> Result<Change, Self::Error> {
443 self.changes
444 .read()
445 .unwrap()
446 .get(hash)
447 .cloned()
448 .ok_or_else(|| MemoryStoreError::NotFound(hash.to_base32()))
449 }
450
451 fn has_change(&self, hash: &Hash) -> bool {
452 self.changes.read().unwrap().contains_key(hash)

Callers 10

get_verified_changeMethod · 0.45
has_changeMethod · 0.45
has_contentsMethod · 0.45
get_headerMethod · 0.45
get_dependenciesMethod · 0.45
knowsMethod · 0.45
test_insert_and_getFunction · 0.45
test_concurrent_readsFunction · 0.45
test_multiple_changesFunction · 0.45

Calls 4

getMethod · 0.65
unwrapMethod · 0.45
readMethod · 0.45
to_base32Method · 0.45

Tested by 4

test_insert_and_getFunction · 0.36
test_concurrent_readsFunction · 0.36
test_multiple_changesFunction · 0.36