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

Method inode_position

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

Source from the content-addressed store, hash-verified

474 }
475
476 fn inode_position(&self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
477 let table = self.txn.open_table(INODES)?;
478 let result = table.get(inode.get())?;
479 match result {
480 Some(value) => {
481 let (change_id, pos) = decode_position(value.value());
482 Ok(Some(Position::new(
483 NodeId::new(change_id),
484 ChangePosition::new(pos),
485 )))
486 }
487 None => Ok(None),
488 }
489 }
490
491 fn position_inode(&self, pos: Position<NodeId>) -> PristineResult<Option<Inode>> {
492 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