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

Method from_change

atomic-core/src/change/verified.rs:37–44  ·  view source on GitHub ↗

Conservative fallback for stores that only provide decoded values.

(change: Change)

Source from the content-addressed store, hash-verified

35
36 /// Conservative fallback for stores that only provide decoded values.
37 pub fn from_change(change: Change) -> Result<Self, ChangeError> {
38 let hash = change.hash()?;
39 Ok(Self {
40 hash,
41 change: Arc::new(change),
42 source_digest: None,
43 })
44 }
45
46 pub fn hash(&self) -> Hash {
47 self.hash

Callers

nothing calls this directly

Calls 1

hashMethod · 0.45

Tested by

no test coverage detected