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

Method get_change

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

Source from the content-addressed store, hash-verified

416 type Error = MemoryStoreError;
417
418 fn get_change(&self, hash: &Hash) -> Result<Change, Self::Error> {
419 self.changes
420 .read()
421 .unwrap()
422 .get(hash)
423 .cloned()
424 .ok_or_else(|| MemoryStoreError::NotFound(hash.to_base32()))
425 }
426
427 fn has_change(&self, hash: &Hash) -> bool {
428 self.changes.read().unwrap().contains_key(hash)

Callers 9

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 3

getMethod · 0.65
unwrapMethod · 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