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:1894–1908  ·  view source on GitHub ↗
(
        &self,
        vertex_key: &[u8; 24],
    )

Source from the content-addressed store, hash-verified

1892 }
1893
1894 fn get_crdt_vertex_branch(
1895 &self,
1896 vertex_key: &[u8; 24],
1897 ) -> PristineResult<Option<crate::crdt::BranchId>> {
1898 let table = self.txn.open_table(VERTEX_BRANCH)?;
1899 let result = table.get(vertex_key)?;
1900 match result {
1901 Some(value) => {
1902 let bytes: [u8; 12] = *value.value();
1903 drop(value);
1904 Ok(Some(decode_branch_id(&bytes)))
1905 }
1906 None => Ok(None),
1907 }
1908 }
1909}

Callers

nothing calls this directly

Calls 2

decode_branch_idFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected