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

Method inode_position

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

Source from the content-addressed store, hash-verified

800 }
801
802 fn inode_position(&self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
803 let table = self.txn.open_table(INODES)?;
804 let result = table.get(inode.get())?;
805 match result {
806 Some(value) => {
807 let (change_id, pos) = decode_position(value.value());
808 Ok(Some(Position::new(
809 NodeId::new(change_id),
810 ChangePosition::new(pos),
811 )))
812 }
813 None => Ok(None),
814 }
815 }
816
817 fn position_inode(&self, pos: Position<NodeId>) -> PristineResult<Option<Inode>> {
818 let table = self.txn.open_table(REV_INODES)?;

Callers

nothing calls this directly

Calls 3

decode_positionFunction · 0.85
valueMethod · 0.80
getMethod · 0.65

Tested by

no test coverage detected