[][src]Trait bit_vec::BitBlock

pub trait BitBlock: Copy + Add<Self, Output = Self> + Sub<Self, Output = Self> + Shl<usize, Output = Self> + Shr<usize, Output = Self> + Not<Output = Self> + BitAnd<Self, Output = Self> + BitOr<Self, Output = Self> + BitXor<Self, Output = Self> + Rem<Self, Output = Self> + Eq + Ord + Hash {
    pub fn bits() -> usize;
pub fn from_byte(byte: u8) -> Self;
pub fn count_ones(self) -> usize;
pub fn zero() -> Self;
pub fn one() -> Self; pub fn bytes() -> usize { ... } }

Abstracts over a pile of bits (basically unsigned primitives)

Required methods

pub fn bits() -> usize[src]

How many bits it has

pub fn from_byte(byte: u8) -> Self[src]

Convert a byte into this type (lowest-order bits set)

pub fn count_ones(self) -> usize[src]

Count the number of 1's in the bitwise repr

pub fn zero() -> Self[src]

Get 0

pub fn one() -> Self[src]

Get 1

Loading content...

Provided methods

pub fn bytes() -> usize[src]

How many bytes it has

Loading content...

Implementations on Foreign Types

impl BitBlock for u8[src]

impl BitBlock for u16[src]

impl BitBlock for u32[src]

impl BitBlock for u64[src]

impl BitBlock for usize[src]

Loading content...


Loading content...