summaryrefslogtreecommitdiffstats
path: root/vendor/bitmaps/README.md
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:41:41 +0000
commit10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87 (patch)
treebdffd5d80c26cf4a7a518281a204be1ace85b4c1 /vendor/bitmaps/README.md
parentReleasing progress-linux version 1.70.0+dfsg1-9~progress7.99u1. (diff)
downloadrustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.tar.xz
rustc-10ee2acdd26a7f1298c6f6d6b7af9b469fe29b87.zip
Merging upstream version 1.70.0+dfsg2.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/bitmaps/README.md')
-rw-r--r--vendor/bitmaps/README.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/vendor/bitmaps/README.md b/vendor/bitmaps/README.md
new file mode 100644
index 000000000..7d9d4b8b9
--- /dev/null
+++ b/vendor/bitmaps/README.md
@@ -0,0 +1,50 @@
+# 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
+
+```rust
+use bitmaps::Bitmap;
+use typenum::U10;
+
+fn main() {
+ let mut bitmap = Bitmap::<U10>::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));
+}
+```
+
+## Documentation
+
+* [API docs](https://docs.rs/bitmaps)
+
+## 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][coc]. By participating in this project you agree to abide by its
+terms.
+
+[sized-chunks]: https://github.com/bodil/sized-chunks
+[coc]: https://github.com/bodil/bitmaps/blob/master/CODE_OF_CONDUCT.md