Trait elliptic_curve::BitView[]

pub trait BitView {
    type Store: BitStore;
    pub fn view_bits<O>(&self) -> &BitSlice<O, Self::Store>
    where
        O: BitOrder
;
pub fn view_bits_mut<O>(&mut self) -> &mut BitSlice<O, Self::Store>
    where
        O: BitOrder
; }

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

type Store: BitStore

The region’s storage type.

Loading content...

Required methods

pub fn view_bits<O>(&self) -> &BitSlice<O, Self::Store> 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.

pub fn view_bits_mut<O>(&mut self) -> &mut BitSlice<O, Self::Store> where
    O: BitOrder, 

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.

Loading content...

Implementations on Foreign Types

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

impl<T> BitView for [T] where
    T: BitStore, 

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

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

type Store = T

Loading content...

Implementors

impl<T> BitView for T where
    T: BitStore, 

type Store = T

Loading content...