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

Method get_verified_change

atomic-core/src/change/store.rs:110–120  ·  view source on GitHub ↗

Load an immutable identity-bound value. Custom stores keep conservative canonical hash verification unless they provide a checked encoded reader.

(
        &self,
        hash: &Hash,
    )

Source from the content-addressed store, hash-verified

108 /// Load an immutable identity-bound value. Custom stores keep conservative
109 /// canonical hash verification unless they provide a checked encoded reader.
110 fn get_verified_change(
111 &self,
112 hash: &Hash,
113 ) -> Result<super::VerifiedChange, super::VerifiedLoadError<Self::Error>> {
114 let change = self
115 .get_change(hash)
116 .map_err(super::VerifiedLoadError::Store)?;
117 let verified = super::VerifiedChange::from_change(change)?;
118 verified.check_hash(hash)?;
119 Ok(verified)
120 }
121
122 /// Revalidate a cache hit against current backing data. The default reloads
123 /// and verifies; stores must not trust a pathname, mtime or a prior receipt.

Callers 1

Implementers 3

build_tests.rsatomic-core/src/pristine/span_patch_st
verified.rsatomic-core/src/change/verified.rs
store.rsatomic-core/src/change/store.rs

Calls 2

check_hashMethod · 0.80
get_changeMethod · 0.45

Tested by

no test coverage detected