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

Function classify_effect_lease

atomic-repository/src/repository/operation.rs:232–244  ·  view source on GitHub ↗
(
    observed: &EffectValue,
    expected_old: &EffectValue,
    expected_new: &EffectValue,
)

Source from the content-addressed store, hash-verified

230}
231
232pub(super) fn classify_effect_lease(
233 observed: &EffectValue,
234 expected_old: &EffectValue,
235 expected_new: &EffectValue,
236) -> LeaseClassification {
237 if observed == expected_old {
238 LeaseClassification::Apply
239 } else if observed == expected_new {
240 LeaseClassification::AlreadyApplied
241 } else {
242 LeaseClassification::Diverged
243 }
244}
245
246/// Construct a stable content-addressed receipt for one operation.
247///

Calls

no outgoing calls

Tested by

no test coverage detected