bit_buf/read.rs
1use crate::{BitBuf, Storage};
2
3impl<S: Storage> BitBuf<S> {
4 /// Read a BE-bit-order [`u8`] from `byte_offset` without performing any bound checks
5 ///
6 /// # Safety
7 ///
8 /// This is UB if `byte_offset >= len(storage)`
9 #[inline(always)]
10 pub unsafe fn read_u8_be_aligned_full_at_unchecked(&self, byte_offset: usize) -> u8 {
11 *unsafe { self.bytes().get_unchecked(byte_offset) }
12 }
13}