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

Method inode_position

atomic-core/src/pristine/txn/read.rs:431–444  ·  view source on GitHub ↗
(&self, inode: Inode)

Source from the content-addressed store, hash-verified

429 }
430
431 fn inode_position(&self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
432 let table = self.txn.open_table(INODES)?;
433 let result = table.get(inode.get())?;
434 match result {
435 Some(value) => {
436 let (change_id, pos) = decode_position(value.value());
437 Ok(Some(Position::new(
438 NodeId::new(change_id),
439 ChangePosition::new(pos),
440 )))
441 }
442 None => Ok(None),
443 }
444 }
445
446 fn position_inode(&self, pos: Position<NodeId>) -> PristineResult<Option<Inode>> {
447 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