bitmaps

Bitmap types for Rust

Latest version: 3.2.1 registry icon
Maintenance score
0
Safety score
0
Popularity score
72
Check your open source dependency risks. Get immediate insight about security, stability and licensing risks.
Security
  Vulnerabilities
Version Suggest Low Medium High Critical
3.2.1 0 0 0 0 0
3.2.0 0 0 0 0 0
3.1.0 0 0 0 0 0
3.0.0 0 0 0 0 0
2.1.0 0 0 0 0 0
2.0.0 0 0 0 0 0
1.0.0 0 0 0 0 0

Stability
Latest release:

3.2.1 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform

Licensing

Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.

MPL-2.0   -   Mozilla Public License 2.0

Not a wildcard

Not proprietary

OSI Compliant



bitmaps

A fixed size compact boolean array in Rust.

Overview

This crate provides a convenient and efficient way of declaring and working with fixed size bitmaps in Rust. It was originally split out from the sized-chunks crate and its primary purpose is to support it, but the Bitmap type has proven to be generally useful enough that it was split off into a separate crate.

Example

use bitmaps::Bitmap;

fn main() {
    let mut bitmap = Bitmap::<10>::new();
    assert_eq!(bitmap.set(5, true), false);
    assert_eq!(bitmap.set(5, true), true);
    assert_eq!(bitmap.get(5), true);
    assert_eq!(bitmap.get(6), false);
    assert_eq!(bitmap.len(), 1);
    assert_eq!(bitmap.set(3, true), false);
    assert_eq!(bitmap.len(), 2);
    assert_eq!(bitmap.first_index(), Some(3));
    assert_eq!(bitmap.last_index(), Some(5));
}

Documentation

Licence

Copyright 2019 Bodil Stokke

This software is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.

Code of Conduct

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.