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)
| 350 | /// |
| 351 | /// Returns an error if hash computation fails. |
| 352 | pub fn insert_change(&self, change: Change) -> Result<Hash, ChangeError> { |
| 353 | let hash = change.hash()?; |
| 354 | self.insert(hash, change); |
| 355 | Ok(hash) |
| 356 | } |
| 357 | |
| 358 | /// Remove a change from the store. |
| 359 | /// |