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

Method put_path_claim

atomic-core/src/pristine/txn/write/path_claim.rs:68–75  ·  view source on GitHub ↗
(&mut self, path: &str, event: &PathClaimEvent)

Source from the content-addressed store, hash-verified

66 }
67
68 fn put_path_claim(&mut self, path: &str, event: &PathClaimEvent) -> PristineResult<bool> {
69 let encoded = encode_path_claim_event(event);
70 let mut table = self.txn.open_multimap_table(PATH_CLAIMS)?;
71 // redb returns true when this exact key/value pair was already present.
72 // PathClaimMutTxnT exposes conventional insertion semantics instead:
73 // true means newly inserted, false means the idempotent duplicate.
74 Ok(!table.insert(path, &encoded)?)
75 }
76
77 fn reset_path_claim_migration(&mut self) -> PristineResult<()> {
78 let paths = {

Calls 2

encode_path_claim_eventFunction · 0.85
insertMethod · 0.45