[][src]Trait gf::support::bitvec::BitSeq

pub trait BitSeq {
    fn bit_len(&self) -> usize;
fn get_bit(&self, bit_index: usize) -> bool; fn lsb(&self) -> Option<bool> { ... }
fn msb(&self) -> Option<bool> { ... } }

An immutable sequence of bits.

Required methods

fn bit_len(&self) -> usize

Return sequence length in bits.

fn get_bit(&self, bit_index: usize) -> bool

Return bit value at bit_index.

Errors

  • Panics on out-of-bound indexing.
Loading content...

Provided methods

fn lsb(&self) -> Option<bool>

Return the first, least significant bit.

fn msb(&self) -> Option<bool>

Return the last, most significant bit. If the sequence is interpreted as a signed integer or an IEEE 754 floating-point number, this is also the sign bit.

Loading content...

Trait Implementations

impl<'a> Debug for dyn BitSeq + 'a[src]

Implementations on Foreign Types

impl BitSeq for u8[src]

impl BitSeq for [u8][src]

impl BitSeq for u16[src]

impl BitSeq for [u16][src]

impl BitSeq for u32[src]

impl BitSeq for [u32][src]

impl BitSeq for u64[src]

impl BitSeq for [u64][src]

impl BitSeq for u128[src]

impl BitSeq for [u128][src]

Loading content...

Implementors

impl BitSeq for BitVec[src]

impl<'a> BitSeq for BitSlice<'a>[src]

Loading content...