Crate bv [] [src]

The main type exported by the library, BV, is a packed, growable bit-vector. Its API mirrors that of Vec where reasonable. The library also defines slices operations that return BitSlice or BitSliceMut, akin to Rust’s array slices but for bit-vectors. A common API to bit-vectors and bit-slices is provided by the BitVec and BitVecMut traits, which also allow treating all primitive unsigned integer types (uN), vectors thereof (Vec<uN>), and Vec<bool> as bit-vectors.

Usage

It’s on crates.io, so you can add

[dependencies]
bv = "*"

to your Cargo.toml and

extern crate bv;

to your crate root.

Structs

BV

A bit-vector, akin to Vec<bool> but packed.

BitSlice

A slice of a bit-vector; akin to &'a [bool] but packed.

BitSliceBlockIter

An iterator over the blocks of a bit slice.

BitSliceMut

A mutable slice of a bit-vector; akin to &'a mut [bool] but packed.

Traits

BitSliceable

Types that support (re-)slicing by ranges.

BitVec

Read-only bit vector operations.

BitVecMut

Mutable bit vector operations that don’t affect the length.

BitVecPush

Bit vector operations that change the length.

BlockType

Interface to primitive bit storage.