$ bit-set
v0.9.1A set of bits
Latest Update Summary
Crate
Name: bit-set New version: 0.9.0 Release date: 2026-03-10T12:56:36.545568Z
Crate readme
Short description A compact set of bits.
Long description
An implementation of a set using a bit vector as an underlying representation for holding unsigned numerical elements. It should also be noted that the amount of storage necessary for holding a set of objects is proportional to the maximum of the objects when viewed as a usize.
Features • serde • serde_no_std • no_std
Code Examples Add to Cargo.toml
[dependencies]
bit-set = "0.9"
Example usage of BitSet
use bit_set::BitSet;
let mut s = BitSet::new();
s.insert(0);
s.insert(3);
s.insert(7);
s.remove(7);
if !s.contains(7) {
println!("There is no 7");
}
let other = BitSet::from_bytes(&[0b11010000]);
s.union_with(&other);
for x in s.iter() {
println!("{}", x);
}
let bv = s.into_bit_vec();
assert!(bv[3]);
Links • https://crates.io/crates/bit-set • https://docs.rs/bit-set/0.9.0/bit_set/
https://docs.rs/bit-set/ https://api.github.com/repos/contain-rs/bit-set/releases/72659970
Release info
Release version:
Release description
Code Examples
Patch update: 0.9.0 → 0.9.1
$ DOWNLOADS TREND
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add bit-setOr add to Cargo.toml: bit-set = "0.9.1"