(&mut self, buf: Array<u8, BS>, pos: usize)
| 259 | /// If `pos` is bigger or equal to block size. |
| 260 | #[inline] |
| 261 | pub fn set(&mut self, buf: Array<u8, BS>, pos: usize) { |
| 262 | assert!(K::invariant(pos, BS::USIZE)); |
| 263 | self.buffer = MaybeUninit::new(buf); |
| 264 | // SAFETY: we have asserted that `pos` satisfies the invariant and |
| 265 | // the `buffer` field is fully initialized |
| 266 | unsafe { |
| 267 | self.set_pos_unchecked(pos); |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | /// Return size of the internal buffer in bytes. |
| 272 | #[inline(always)] |
nothing calls this directly
no test coverage detected