(&self)
| 234 | /// Return current cursor position. |
| 235 | #[inline(always)] |
| 236 | pub fn get_pos(&self) -> usize { |
| 237 | let pos = K::get_pos(&self.buffer, &self.pos); |
| 238 | if !K::invariant(pos, BS::USIZE) { |
| 239 | debug_assert!(false); |
| 240 | // SAFETY: `pos` never breaks the invariant |
| 241 | unsafe { |
| 242 | core::hint::unreachable_unchecked(); |
| 243 | } |
| 244 | } |
| 245 | pos |
| 246 | } |
| 247 | |
| 248 | /// Return slice of data stored inside the buffer. |
| 249 | #[inline(always)] |
no outgoing calls