(&mut self, amount: usize)
| 88 | } |
| 89 | |
| 90 | fn advance(&mut self, amount: usize) -> crate::std::io::Result<()> { |
| 91 | self.position = self.position.checked_add(amount as u64).ok_or_else(|| { |
| 92 | crate::std::io::Error::new(crate::std::io::ErrorKind::InvalidInput, "cursor position overflow") |
| 93 | })?; |
| 94 | Ok(()) |
| 95 | } |
| 96 | |
| 97 | /// Returns the current cursor position. |
| 98 | pub const fn position(&self) -> u64 { |