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

Method snapshot_inodes

atomic-core/src/pristine/txn/write/tree.rs:56–69  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

54 }
55
56 fn snapshot_inodes(&self) -> PristineResult<Vec<(Inode, Position<NodeId>)>> {
57 let table = self.txn.open_table(INODES)?;
58 let mut rows = Vec::new();
59 for entry in table.iter()? {
60 let (inode, position) = entry?;
61 let (change_id, pos) = decode_position(position.value());
62 rows.push((
63 Inode::new(inode.value()),
64 Position::new(NodeId::new(change_id), ChangePosition::new(pos)),
65 ));
66 }
67 rows.sort_unstable();
68 Ok(rows)
69 }
70
71 fn snapshot_rev_inodes(&self) -> PristineResult<Vec<(Position<NodeId>, Inode)>> {
72 let table = self.txn.open_table(REV_INODES)?;

Callers

nothing calls this directly

Calls 4

decode_positionFunction · 0.85
valueMethod · 0.80
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected