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

Method put_inode

atomic-core/src/pristine/txn/write/mod.rs:1397–1408  ·  view source on GitHub ↗
(&mut self, inode: Inode, pos: Position<NodeId>)

Source from the content-addressed store, hash-verified

1395 }
1396
1397 fn put_inode(&mut self, inode: Inode, pos: Position<NodeId>) -> PristineResult<()> {
1398 let pos_bytes = encode_position(pos.change.get(), pos.pos.get());
1399 {
1400 let mut table = self.txn.open_table(INODES)?;
1401 table.insert(inode.get(), &pos_bytes)?;
1402 }
1403 {
1404 let mut table = self.txn.open_table(REV_INODES)?;
1405 table.insert(&pos_bytes, inode.get())?;
1406 }
1407 Ok(())
1408 }
1409
1410 fn del_inode(&mut self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
1411 let pos = {

Callers 6

test_inode_operationsFunction · 0.80
write_import_recordedMethod · 0.80
insert_changeMethod · 0.80
write_recordedMethod · 0.80

Calls 3

encode_positionFunction · 0.85
getMethod · 0.65
insertMethod · 0.45

Tested by 1

test_inode_operationsFunction · 0.64