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

Method put_inode

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

Source from the content-addressed store, hash-verified

2017 }
2018
2019 fn put_inode(&mut self, inode: Inode, pos: Position<NodeId>) -> PristineResult<()> {
2020 let pos_bytes = encode_position(pos.change.get(), pos.pos.get());
2021 {
2022 let mut table = self.txn.open_table(INODES)?;
2023 table.insert(inode.get(), &pos_bytes)?;
2024 }
2025 {
2026 let mut table = self.txn.open_table(REV_INODES)?;
2027 table.insert(&pos_bytes, inode.get())?;
2028 }
2029 Ok(())
2030 }
2031
2032 fn del_inode(&mut self, inode: Inode) -> PristineResult<Option<Position<NodeId>>> {
2033 let pos = {

Calls 3

encode_positionFunction · 0.85
getMethod · 0.65
insertMethod · 0.45