[][src]Trait bitvec::view::BitView

pub trait BitView {
    type Store: BitStore;
    type Mem: BitMemory;
    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::Alias>: 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::Alias>: BitField

    where
        O: BitOrder
; }

Views a type that can store bits as a bit-slice.

This trait is implemented on all T: BitStore 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: BitStore; 0 ..= 32] 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 bit-storage type that can be viewed with this trait, then you can implement this trait by forwarding to the interior view.

Associated Types

type Store: BitStore

The access-control type of the storage region.

type Mem: BitMemory

The underlying register type of the storage region.

Loading content...

Required methods

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::Alias>: BitField
where
    O: BitOrder

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.

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::Alias>: BitField
where
    O: BitOrder

Views a memory region as a mutable BitSlice.

Type Parameters

  • O: The bit ordering used for the region.

Parameters

  • &self: The region to view as individual mutable bits.

Returns

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

Loading content...

Implementations on Foreign Types

impl<T> BitView for [T] where
    T: BitStore + BitRegister
[src]

type Mem = T::Mem

type Store = T

impl<T> BitView for [T; 0] where
    T: BitStore
[src]

type Mem = T::Mem

type Store = T

impl<T> BitView for [T; 1] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 2] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 3] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 4] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 5] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 6] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 7] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 8] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 9] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 10] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 11] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 12] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 13] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 14] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 15] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 16] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 17] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 18] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 19] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 20] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 21] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 22] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 23] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 24] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 25] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 26] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 27] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 28] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 29] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 30] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 31] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 32] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 33] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 34] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 35] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 36] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 37] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 38] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 39] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 40] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 41] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 42] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 43] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 44] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 45] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 46] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 47] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 48] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 49] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 50] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 51] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 52] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 53] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 54] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 55] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 56] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 57] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 58] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 59] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 60] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 61] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 62] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 63] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

impl<T> BitView for [T; 64] where
    T: BitStore
[src]

type Store = T

type Mem = T::Mem

Loading content...

Implementors

impl<T> BitView for T where
    T: BitStore + BitRegister
[src]

type Mem = T::Mem

type Store = Self

Loading content...