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

Method get_crdt_branch

atomic-core/src/pristine/txn/write/mod.rs:2305–2315  ·  view source on GitHub ↗
(&self, key: &[u8; 12])

Source from the content-addressed store, hash-verified

2303 }
2304
2305 fn get_crdt_branch(&self, key: &[u8; 12]) -> PristineResult<Option<SerializedBranch>> {
2306 let table = self.txn.open_table(BRANCHES)?;
2307 let result = match table.get(key)? {
2308 Some(guard) => {
2309 let bytes: [u8; 24] = *guard.value();
2310 Some(decode_branch_value(&bytes))
2311 }
2312 None => None,
2313 };
2314 Ok(result)
2315 }
2316
2317 fn get_crdt_branch_after(&self, branch_key: &[u8; 12]) -> PristineResult<Option<[u8; 12]>> {
2318 let table = self.txn.open_table(BRANCH_AFTER)?;

Callers

nothing calls this directly

Calls 3

decode_branch_valueFunction · 0.85
valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected