Skip to main content

ic_stable_roaring/
lib.rs

1#![doc = include_str!("../README.md")]
2
3#[cfg(feature = "canbench")]
4mod bench;
5pub mod bitmap;
6mod journal;
7mod memory;
8
9// `build.rs` generates this file under Cargo's `OUT_DIR` for the active build configuration.
10include!(concat!(env!("OUT_DIR"), "/journal_layout.rs"));
11
12/// Byte length of the on-disk journal region (`JOURNAL_CAP_SLOTS` records × 5 bytes each).
13pub(crate) const JOURNAL_REGION_BYTES: usize = JOURNAL_CAP_SLOTS * 5;
14
15const _: () = assert!(JOURNAL_REGION_BYTES.is_multiple_of(JOURNAL_READ_CHUNK_BYTES));
16const _: () = assert!(JOURNAL_READ_CHUNK_BYTES.is_multiple_of(5));
17
18/// Maximum exclusive logical length (`len_bits`) and maximum `SetLen` value supported by the API.
19///
20/// Bit indices are `u32`; the exclusive logical length may be `u32::MAX + 1`.
21pub(crate) use journal::LEN_MAX as JOURNAL_LEN_MAX;
22
23pub use bitmap::RoaringBitmap as StableRoaringBitmap;
24pub use bitmap::{BitmapError, ContainsView, InitError, RoaringBitmap};
25pub use memory::GrowFailed;