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

Method list_registered_changes

atomic-core/src/pristine/txn/read.rs:79–95  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

77 }
78
79 fn list_registered_changes(&self) -> PristineResult<Vec<(NodeId, Hash)>> {
80 let external = self.txn.open_table(EXTERNAL)?;
81 let node_types = self.txn.open_table(NODE_TYPES)?;
82 let mut changes = Vec::new();
83 for result in external.iter()? {
84 let (key, value) = result?;
85 let node_id = NodeId::new(key.value());
86 let is_change = node_types
87 .get(node_id.get())?
88 .map(|node_type| node_type.value() == node_type::CHANGE)
89 .unwrap_or(true);
90 if is_change {
91 changes.push((node_id, Hash::from_bytes(*value.value())));
92 }
93 }
94 Ok(changes)
95 }
96
97 fn iter_adjacent(
98 &self,

Callers 1

Calls 3

getMethod · 0.65
iterMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected