Append content to the buffer and return the position range. # Arguments `data` - Content bytes to append # Returns A tuple of (start_position, end_position) for the appended content. # Example ```rust,ignore let (start, end) = ctx.append_content(b"Hello"); assert_eq!(end - start, 5); ```
(&mut self, data: &[u8])
| 190 | /// assert_eq!(end - start, 5); |
| 191 | /// ``` |
| 192 | pub fn append_content(&mut self, data: &[u8]) -> (ChangePosition, ChangePosition) { |
| 193 | let start = ChangePosition::new(self.content_position); |
| 194 | self.content.extend_from_slice(data); |
| 195 | self.content_position += data.len() as u64; |
| 196 | let end = ChangePosition::new(self.content_position); |
| 197 | (start, end) |
| 198 | } |
| 199 | |
| 200 | /// Add a dependency on an existing change. |
| 201 | /// |
no test coverage detected