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

Method get_crdt_vertex_branch

atomic-core/src/pristine/txn/write/mod.rs:1279–1293  ·  view source on GitHub ↗
(
        &self,
        vertex_key: &[u8; 24],
    )

Source from the content-addressed store, hash-verified

1277 }
1278
1279 fn get_crdt_vertex_branch(
1280 &self,
1281 vertex_key: &[u8; 24],
1282 ) -> PristineResult<Option<crate::crdt::BranchId>> {
1283 let table = self.txn.open_table(VERTEX_BRANCH)?;
1284 let result = table.get(vertex_key)?;
1285 match result {
1286 Some(value) => {
1287 let bytes: [u8; 12] = *value.value();
1288 drop(value);
1289 Ok(Some(decode_branch_id(&bytes)))
1290 }
1291 None => Ok(None),
1292 }
1293 }
1294}

Callers

nothing calls this directly

Calls 2

decode_branch_idFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected