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:2335–2347  ·  view source on GitHub ↗
(&self, path: &str)

Source from the content-addressed store, hash-verified

2333 }
2334
2335 fn get_trunk_by_path(&self, path: &str) -> PristineResult<Option<crate::crdt::TrunkId>> {
2336 use crate::crdt::tables::decode_trunk_id;
2337 let table = self.txn.open_table(PATH_TRUNK)?;
2338 let result = table.get(path)?;
2339 match result {
2340 Some(guard) => {
2341 let key: [u8; 12] = *guard.value();
2342 drop(guard);
2343 Ok(Some(decode_trunk_id(&key)))
2344 }
2345 None => Ok(None),
2346 }
2347 }
2348
2349 fn iter_trunk_branches(
2350 &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