Module bitvec::order

source · []
Expand description

Ordering of bits within register elements.

bitvec structures are parametric over any ordering of bits within an element. The BitOrder trait maps a cursor position (indicated by the BitIdx type) to an electrical position (indicated by the BitPos type) within that element, and also defines the order of traversal over an element.

The only requirement on implementors of BitOrder is that the transform function from cursor (BitIdx) to position (BitPos) is total (every integer in the domain 0 .. T::BITS is used) and unique (each cursor maps to one and only one position, and each position is mapped by one and only one cursor). Contiguity is not required.

BitOrder is a stateless trait, and implementors should be zero-sized types. !

Structs

Traverses an element from LSbit to MSbit.

Traverses an element from MSbit to LSbit.

Traits

An ordering over an element.

Type Definitions

A default bit ordering.