[−][src]Trait bitvec::Cursor
A cursor over an element.
Usage
bitvec structures store and operate on semantic counts, not bit positions. The
Cursor::at function takes a semantic cursor, BitIdx, and produces an
electrical position, BitPos.
Associated Constants
Loading content...Required methods
fn at<T: Bits>(cursor: BitIdx) -> BitPos
Translate a semantic bit index into an electrical bit position.
Parameters
cursor: The semantic bit value. This must be in the domain0 .. T::SIZE.
Returns
- A concrete position. This value can be used for shifting and masking to extract a bit from an element.
Type Parameters
T: Bits: The storage type for which the position will be calculated.
Safety
This function requires that cursor be in the domain 0 .. T::SIZE.
Implementors must check this themselves.
Implementors
impl Cursor for BigEndian[src]
const TYPENAME: &'static str[src]
fn at<T: Bits>(cursor: BitIdx) -> BitPos[src]
Maps a semantic count to a concrete position.
BigEndian order moves from MSb first to LSb last.