pub trait BitView {
    type Store: BitStore;
    fn view_bits<O>(&self) -> &BitSlice<O, Self::Store>
Notable traits for &'a BitSlice<O, T>
impl<'a, O, T> Read for &'a BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField
impl<'a, O, T> Write for &'a mut BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField

    where
        O: BitOrder
;
fn view_bits_mut<O>(&mut self) -> &mut BitSlice<O, Self::Store>
Notable traits for &'a BitSlice<O, T>
impl<'a, O, T> Read for &'a BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField
impl<'a, O, T> Write for &'a mut BitSlice<O, T> where
    O: BitOrder,
    T: BitStore,
    BitSlice<O, T>: BitField

    where
        O: BitOrder
; }
Expand description

Creates a BitSlice view over some type that supports it.

This trait is implemented on all BitRegister types, and the arrays and slices of them that are supported by the standard library.

This means that until type-level integers are stabilized, only arrays in [T: BitRegister; 0 ..= 64] will implement the trait; wider arrays will need to reborrow as slices [T] in order to use the slice implementation.

If you have a type that contains a BitRegister type that can be viewed with this trait, then you can implement this trait by forwarding to the interior view.

Associated Types

The region’s storage type.

Required methods

Views a memory region as a BitSlice.

Type Parameters
  • O: The bit ordering used for the region.
Parameters
  • &self: The region to view as individual bits.
Returns

A &BitSlice view over the region at *self.

Views a memory region as a mutable BitSlice.

Type Parameters
  • O: The bit ordering used for the region.
Parameters
  • &mut self: The region to view as individual mutable bits.
Returns

A &mut BitSlice view over the region at *self.

Implementations on Foreign Types

Implementors