(&mut self, buf: &[u8])
| 302 | /// to block size. |
| 303 | #[inline(always)] |
| 304 | unsafe fn set_data_unchecked(&mut self, buf: &[u8]) { |
| 305 | unsafe { |
| 306 | self.set_pos_unchecked(buf.len()); |
| 307 | let dst_ptr: *mut u8 = self.buffer.as_mut_ptr().cast(); |
| 308 | ptr::copy_nonoverlapping(buf.as_ptr(), dst_ptr, buf.len()); |
| 309 | } |
| 310 | } |
| 311 | } |
| 312 | |
| 313 | /// Size of serialized `BlockBuffer` in bytes. |
no test coverage detected