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

Method inode_position

atomic-core/src/pristine/txn/write/tree.rs:30–43  ·  view source on GitHub ↗
(&self, inode: Inode)

Source from the content-addressed store, hash-verified

28 }
29
30 fn inode_position(&self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
31 let table = self.txn.open_table(INODES)?;
32 let result = table.get(inode.get())?;
33 match result {
34 Some(value) => {
35 let (change_id, pos) = decode_position(value.value());
36 Ok(Some(Position::new(
37 NodeId::new(change_id),
38 ChangePosition::new(pos),
39 )))
40 }
41 None => Ok(None),
42 }
43 }
44
45 fn position_inode(&self, pos: Position<NodeId>) -> PristineResult<Option<Inode>> {
46 let table = self.txn.open_table(REV_INODES)?;

Callers

nothing calls this directly

Calls 2

decode_positionFunction · 0.85
getMethod · 0.65

Tested by

no test coverage detected