pub struct Bitfield<T, U> { /* private fields */ }
Implementations§
Source§impl<T: AsRef<[U]>, U: UnsignedPrimInt> Bitfield<T, U>
impl<T: AsRef<[U]>, U: UnsignedPrimInt> Bitfield<T, U>
pub fn bits(&self) -> &[U]
pub fn get_bits<V: UnsignedPrimInt + TryFrom<U>>( &self, range: Range<usize>, ) -> V
pub fn get_bits_into_slice<V>(
&self,
range: Range<usize>,
dst: &mut [V],
dst_start: usize,
)where
V: UnsignedPrimInt + TryFrom<usize>,
usize: TryFrom<U>,
pub fn get<V: PrimInt>(&self, start_bit: usize) -> Vwhere
V::Unsigned: TryFrom<U>,
Source§impl<T: AsMut<[U]>, U: UnsignedPrimInt> Bitfield<T, U>
impl<T: AsMut<[U]>, U: UnsignedPrimInt> Bitfield<T, U>
pub fn bits_mut(&mut self) -> &mut [U]
pub fn set_bits<V: UnsignedPrimInt + TryInto<U>>( &mut self, range: Range<usize>, src: V, )
pub fn set_bits_from_slice<V: UnsignedPrimInt>(
&mut self,
range: Range<usize>,
src: &[V],
src_start: usize,
)where
U: TryFrom<usize>,
usize: TryFrom<V>,
pub fn set<V: PrimInt>(&mut self, start_bit: usize, src: V)where
V::Unsigned: TryInto<U>,
Trait Implementations§
Source§impl<T: Ord, U: Ord> Ord for Bitfield<T, U>
impl<T: Ord, U: Ord> Ord for Bitfield<T, U>
Source§impl<T: PartialOrd, U: PartialOrd> PartialOrd for Bitfield<T, U>
impl<T: PartialOrd, U: PartialOrd> PartialOrd for Bitfield<T, U>
impl<T: Copy, U: Copy> Copy for Bitfield<T, U>
impl<T: Eq, U: Eq> Eq for Bitfield<T, U>
impl<T, U> StructuralPartialEq for Bitfield<T, U>
Auto Trait Implementations§
impl<T, U> Freeze for Bitfield<T, U>where
T: Freeze,
impl<T, U> RefUnwindSafe for Bitfield<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for Bitfield<T, U>where
T: Send,
U: Send,
impl<T, U> Sync for Bitfield<T, U>where
T: Sync,
U: Sync,
impl<T, U> Unpin for Bitfield<T, U>where
T: Unpin,
U: Unpin,
impl<T, U> UnwindSafe for Bitfield<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)