Compute the hash of this change without writing it. This serializes the change to a temporary buffer using the V3 format and returns the content hash from the trailer. # Errors Returns an error if serialization fails.
(&self)
| 371 | /// |
| 372 | /// Returns an error if serialization fails. |
| 373 | pub fn hash(&self) -> Result<Hash, ChangeError> { |
| 374 | let mut buffer = Vec::new(); |
| 375 | let hash = self.serialize(&mut buffer)?; |
| 376 | Ok(hash) |
| 377 | } |
| 378 | |
| 379 | /// Serialize this change to a writer using the V3 format. |
| 380 | /// |