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

Method get_crdt_branch

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

Source from the content-addressed store, hash-verified

1279 }
1280
1281 fn get_crdt_branch(
1282 &self,
1283 key: &[u8; 12],
1284 ) -> PristineResult<Option<crate::crdt::tables::SerializedBranch>> {
1285 use crate::crdt::tables::{decode_branch_value, BRANCHES};
1286 let table = crdt_table_opt!(self, BRANCHES);
1287 let result = match table.get(key)? {
1288 Some(guard) => {
1289 let bytes: [u8; 24] = *guard.value();
1290 Some(decode_branch_value(&bytes))
1291 }
1292 None => None,
1293 };
1294 Ok(result)
1295 }
1296
1297 fn get_crdt_branch_after(&self, branch_key: &[u8; 12]) -> PristineResult<Option<[u8; 12]>> {
1298 use crate::crdt::tables::BRANCH_AFTER;

Callers 6

get_file_lines_by_trunkFunction · 0.45
output_file_via_crdtFunction · 0.45
update_branch_stateFunction · 0.45
recordMethod · 0.45

Calls 2

decode_branch_valueFunction · 0.85
getMethod · 0.65

Tested by 1