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

Method put_inode

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

Source from the content-addressed store, hash-verified

1443 }
1444
1445 fn put_inode(&mut self, inode: Inode, pos: Position<NodeId>) -> PristineResult<()> {
1446 let pos_bytes = encode_position(pos.change.get(), pos.pos.get());
1447 {
1448 let mut table = self.txn.open_table(INODES)?;
1449 table.insert(inode.get(), &pos_bytes)?;
1450 }
1451 {
1452 let mut table = self.txn.open_table(REV_INODES)?;
1453 table.insert(&pos_bytes, inode.get())?;
1454 }
1455 Ok(())
1456 }
1457
1458 fn del_inode(&mut self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
1459 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