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

Method list_registered_changes

atomic-core/src/pristine/txn/write/graph.rs:30–46  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

28 }
29
30 fn list_registered_changes(&self) -> PristineResult<Vec<(NodeId, Hash)>> {
31 let external = self.txn.open_table(EXTERNAL)?;
32 let node_types = self.txn.open_table(NODE_TYPES)?;
33 let mut changes = Vec::new();
34 for result in external.iter()? {
35 let (key, value) = result?;
36 let node_id = NodeId::new(key.value());
37 let is_change = node_types
38 .get(node_id.get())?
39 .map(|node_type| node_type.value() == node_type::CHANGE)
40 .unwrap_or(true);
41 if is_change {
42 changes.push((node_id, Hash::from_bytes(*value.value())));
43 }
44 }
45 Ok(changes)
46 }
47
48 fn iter_adjacent(
49 &self,

Calls 4

valueMethod · 0.80
getMethod · 0.65
iterMethod · 0.45
pushMethod · 0.45