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

Method get_trunk_by_path

atomic-core/src/pristine/txn/write/mod.rs:1738–1750  ·  view source on GitHub ↗
(&self, path: &str)

Source from the content-addressed store, hash-verified

1736 }
1737
1738 fn get_trunk_by_path(&self, path: &str) -> PristineResult<Option<crate::crdt::TrunkId>> {
1739 use crate::crdt::tables::decode_trunk_id;
1740 let table = self.txn.open_table(PATH_TRUNK)?;
1741 let result = table.get(path)?;
1742 match result {
1743 Some(guard) => {
1744 let key: [u8; 12] = *guard.value();
1745 drop(guard);
1746 Ok(Some(decode_trunk_id(&key)))
1747 }
1748 None => Ok(None),
1749 }
1750 }
1751
1752 fn iter_trunk_branches(
1753 &self,

Callers

nothing calls this directly

Calls 2

decode_trunk_idFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected