Append raw bytes to the contents buffer. Returns the starting position of the appended content, which can be used to reference this content in hunks. # Arguments `data` - The bytes to append # Returns The byte offset where the content was appended. # Example ```rust use atomic_core::record::RecordBuilder; let mut builder = RecordBuilder::new(); let start = builder.append_contents(b"Hello"
(&mut self, data: &[u8])
| 270 | /// assert_eq!(start2, 5); |
| 271 | /// ``` |
| 272 | pub fn append_contents(&mut self, data: &[u8]) -> u64 { |
| 273 | let start = self.contents.len() as u64; |
| 274 | self.contents.extend_from_slice(data); |
| 275 | start |
| 276 | } |
| 277 | |
| 278 | /// Get a reference to the contents buffer. |
| 279 | /// |