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

Method get_trunk_by_path

atomic-core/src/pristine/txn/read.rs:1808–1820  ·  view source on GitHub ↗
(&self, path: &str)

Source from the content-addressed store, hash-verified

1806 }
1807
1808 fn get_trunk_by_path(&self, path: &str) -> PristineResult<Option<crate::crdt::TrunkId>> {
1809 use crate::crdt::tables::{decode_trunk_id, PATH_TRUNK};
1810 let table = crdt_table_opt!(self, PATH_TRUNK);
1811 let result = table.get(path)?;
1812 match result {
1813 Some(guard) => {
1814 let key: [u8; 12] = *guard.value();
1815 drop(guard);
1816 Ok(Some(decode_trunk_id(&key)))
1817 }
1818 None => Ok(None),
1819 }
1820 }
1821
1822 fn iter_trunk_branches(
1823 &self,

Callers

nothing calls this directly

Calls 3

decode_trunk_idFunction · 0.85
valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected