Append content to the contents blob. Returns the starting position of the appended content.
(&mut self, data: &[u8])
| 284 | /// |
| 285 | /// Returns the starting position of the appended content. |
| 286 | pub fn append_contents(&mut self, data: &[u8]) -> usize { |
| 287 | let start = self.contents.len(); |
| 288 | self.contents.extend_from_slice(data); |
| 289 | start |
| 290 | } |
| 291 | |
| 292 | /// Recompute the contents hash after modifying contents. |
| 293 | pub fn finalize(&mut self) { |