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

Method mark_change_applied

atomic-core/src/pristine/applied_changes.rs:132–138  ·  view source on GitHub ↗

Mark completion after all graph, attribute and FileOps writes. The transaction must commit those effects together with this marker.

(&mut self, id: NodeId)

Source from the content-addressed store, hash-verified

130 /// Mark completion after all graph, attribute and FileOps writes. The
131 /// transaction must commit those effects together with this marker.
132 pub fn mark_change_applied(&mut self, id: NodeId) -> PristineResult<()> {
133 if id.is_root() || self.get_external(id)?.is_none() {
134 return Err(super::error::PristineError::ChangeNotFound { id: id.get() });
135 }
136 self.txn.open_table(APPLIED_CHANGES)?.insert(id.get(), 1)?;
137 Ok(())
138 }
139}
140
141#[cfg(test)]

Calls 5

is_noneMethod · 0.80
getMethod · 0.65
is_rootMethod · 0.45
get_externalMethod · 0.45
insertMethod · 0.45