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

Method get_crdt_branch_vertex

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

Source from the content-addressed store, hash-verified

1429 }
1430
1431 fn get_crdt_branch_vertex(
1432 &self,
1433 branch_key: &[u8; 12],
1434 ) -> PristineResult<Option<GraphNode<NodeId>>> {
1435 use crate::crdt::tables::{decode_vertex_position, BRANCH_VERTEX};
1436 let table = crdt_table_opt!(self, BRANCH_VERTEX);
1437 let result = table.get(branch_key)?;
1438 match result {
1439 Some(value) => {
1440 let bytes: [u8; 24] = *value.value();
1441 drop(value);
1442 Ok(Some(decode_vertex_position(&bytes)))
1443 }
1444 None => Ok(None),
1445 }
1446 }
1447
1448 fn get_crdt_vertex_branch(
1449 &self,

Callers 3

output_file_via_crdtFunction · 0.45

Calls 2

decode_vertex_positionFunction · 0.85
getMethod · 0.65

Tested by 2