pub struct BitCodecLE;Trait Implementations§
Source§impl BitCodec for BitCodecLE
impl BitCodec for BitCodecLE
Source§unsafe fn read_aligned<T: ToUsize + ReadBytes + Shr<Output = T> + BitAnd<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>(
buffer: &[u8],
) -> T
unsafe fn read_aligned<T: ToUsize + ReadBytes + Shr<Output = T> + BitAnd<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>( buffer: &[u8], ) -> T
Reads a value of type T from the buffer argument with a custom bit offset and size assuming
the buffer size is greater or equal to the size of T. Read more
Source§fn read_unaligned<T: ToUsize + ReadBytes + Shr<Output = T> + BitAnd<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>(
buffer: &[u8],
) -> T
fn read_unaligned<T: ToUsize + ReadBytes + Shr<Output = T> + BitAnd<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>( buffer: &[u8], ) -> T
Reads a value of type T from the buffer argument with a custom bit offset and size assuming
the buffer size is always less than the size of T. This is not unsafe as will always cause
a copy into an 8 bytes buffer (the maximum size for T is 8). Read more
Source§unsafe fn write_aligned<T: ToUsize + ReadBytes + WriteBytes + Shl<Output = T> + Shr<Output = T> + BitAnd<Output = T> + BitOr<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>(
buffer: &mut [u8],
value: T,
)
unsafe fn write_aligned<T: ToUsize + ReadBytes + WriteBytes + Shl<Output = T> + Shr<Output = T> + BitAnd<Output = T> + BitOr<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>( buffer: &mut [u8], value: T, )
Writes a value of type T in the buffer argument with a custom bit offset and size assuming
the buffer size is greater or equal to the size of T. Read more
fn write_unaligned<T: ToUsize + ReadBytes + WriteBytes + Shl<Output = T> + Shr<Output = T> + BitAnd<Output = T> + BitOr<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>( buffer: &mut [u8], value: T, )
fn read<T: ToUsize + ReadBytes + Shr<Output = T> + BitAnd<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>( buffer: &[u8], ) -> T
fn write<T: ToUsize + ReadBytes + WriteBytes + Shl<Output = T> + Shr<Output = T> + BitAnd<Output = T> + BitOr<Output = T>, const BIT_OFFSET: usize, const BIT_SIZE: usize>( buffer: &mut [u8], value: T, )
Auto Trait Implementations§
impl Freeze for BitCodecLE
impl RefUnwindSafe for BitCodecLE
impl Send for BitCodecLE
impl Sync for BitCodecLE
impl Unpin for BitCodecLE
impl UnwindSafe for BitCodecLE
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more