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

Method verify

atomic-repository/src/manifest.rs:132–142  ·  view source on GitHub ↗

Verify that the declared state equals the fold of the change log.

(&self)

Source from the content-addressed store, hash-verified

130
131 /// Verify that the declared state equals the fold of the change log.
132 pub fn verify(&self) -> Result<(), ManifestError> {
133 let computed = Self::fold(&self.changes);
134 if computed != self.state {
135 return Err(ManifestError::StateMismatch {
136 name: self.name.clone(),
137 declared: self.state.to_base32(),
138 computed: computed.to_base32(),
139 });
140 }
141 Ok(())
142 }
143
144 /// Serialize to the text wire format.
145 pub fn to_text(&self) -> String {

Callers 8

round_trip_shared_rootFunction · 0.45
round_trip_empty_viewFunction · 0.45
import_v3_bytesMethod · 0.45
view_manifestMethod · 0.45
apply_view_manifestMethod · 0.45

Calls 2

cloneMethod · 0.45
to_base32Method · 0.45

Tested by 5

round_trip_shared_rootFunction · 0.36
round_trip_empty_viewFunction · 0.36