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

Method insert_change

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

Insert a change, computing its hash automatically. # Arguments `change` - The change to store # Returns The computed hash. # Errors Returns an error if hash computation fails.

(&self, change: Change)

Source from the content-addressed store, hash-verified

374 ///
375 /// Returns an error if hash computation fails.
376 pub fn insert_change(&self, change: Change) -> Result<Hash, ChangeError> {
377 let hash = change.hash()?;
378 self.insert(hash, change);
379 Ok(hash)
380 }
381
382 /// Remove a change from the store.
383 ///

Calls 2

hashMethod · 0.45
insertMethod · 0.45