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

Method position_inode

atomic-core/src/pristine/txn/write/tree.rs:46–54  ·  view source on GitHub ↗
(&self, pos: Position<NodeId>)

Source from the content-addressed store, hash-verified

44 }
45
46 fn position_inode(&self, pos: Position<NodeId>) -> PristineResult<Option<Inode>> {
47 let table = self.txn.open_table(REV_INODES)?;
48 let key = encode_position(pos.change.get(), pos.pos.get());
49 let result = table.get(&key)?;
50 match result {
51 Some(value) => Ok(Some(Inode::new(value.value()))),
52 None => Ok(None),
53 }
54 }
55
56 fn snapshot_inodes(&self) -> PristineResult<Vec<(Inode, Position<NodeId>)>> {
57 let table = self.txn.open_table(INODES)?;

Callers

nothing calls this directly

Calls 3

encode_positionFunction · 0.85
valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected