Append content to the contents blob. Returns the starting position of the appended content.
(&mut self, data: &[u8])
| 248 | /// |
| 249 | /// Returns the starting position of the appended content. |
| 250 | pub fn append_contents(&mut self, data: &[u8]) -> usize { |
| 251 | let start = self.contents.len(); |
| 252 | self.contents.extend_from_slice(data); |
| 253 | start |
| 254 | } |
| 255 | |
| 256 | /// Recompute the contents hash after modifying contents. |
| 257 | pub fn finalize(&mut self) { |