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)
| 361 | /// |
| 362 | /// Returns an error if serialization fails. |
| 363 | pub fn hash(&self) -> Result<Hash, ChangeError> { |
| 364 | let mut buffer = Vec::new(); |
| 365 | let hash = self.serialize(&mut buffer)?; |
| 366 | Ok(hash) |
| 367 | } |
| 368 | |
| 369 | /// Serialize this change to a writer using the V3 format. |
| 370 | /// |