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])
| 130 | /// assert_eq!(end - start, 5); |
| 131 | /// ``` |
| 132 | pub fn append_content(&mut self, data: &[u8]) -> (ChangePosition, ChangePosition) { |
| 133 | let start = ChangePosition::new(self.content_position); |
| 134 | self.content.extend_from_slice(data); |
| 135 | self.content_position += data.len() as u64; |
| 136 | let end = ChangePosition::new(self.content_position); |
| 137 | (start, end) |
| 138 | } |
| 139 | |
| 140 | /// Add a dependency on an existing change. |
| 141 | /// |
no test coverage detected