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

Source from the content-addressed store, hash-verified

2355 }
2356
2357 fn get_trunk_by_path(&self, path: &str) -> PristineResult<Option<crate::crdt::TrunkId>> {
2358 use crate::crdt::tables::decode_trunk_id;
2359 let table = self.txn.open_table(PATH_TRUNK)?;
2360 let result = table.get(path)?;
2361 match result {
2362 Some(guard) => {
2363 let key: [u8; 12] = *guard.value();
2364 drop(guard);
2365 Ok(Some(decode_trunk_id(&key)))
2366 }
2367 None => Ok(None),
2368 }
2369 }
2370
2371 fn iter_trunk_branches(
2372 &self,

Callers

nothing calls this directly

Calls 3

decode_trunk_idFunction · 0.85
getMethod · 0.65
valueMethod · 0.45

Tested by

no test coverage detected