pub trait BitFieldSlice<W: Word>: BitFieldSliceCore<W> {
    // Required method
    unsafe fn get_unchecked(&self, index: usize) -> W;

    // Provided method
    fn get(&self, index: usize) -> W { ... }
}
Expand description

A slice of bit fields of constant bit width.

Required Methods§

source

unsafe fn get_unchecked(&self, index: usize) -> W

Return the value at the specified index.

§Safety

index must be in [0..len). No bounds checking is performed.

Provided Methods§

source

fn get(&self, index: usize) -> W

Return the value at the specified index.

§Panics

May panic if the index is not in in [0..len)

Implementors§

source§

impl<T: AsRef<[u8]>> BitFieldSlice<u8> for T

source§

impl<T: AsRef<[u16]>> BitFieldSlice<u16> for T

source§

impl<T: AsRef<[u32]>> BitFieldSlice<u32> for T

source§

impl<T: AsRef<[u64]>> BitFieldSlice<u64> for T

source§

impl<T: AsRef<[u128]>> BitFieldSlice<u128> for T

source§

impl<T: AsRef<[usize]>> BitFieldSlice<usize> for T

source§

impl<W: Word, B: AsRef<[W]>> BitFieldSlice<W> for BitFieldVec<W, B>