diff --git a/croaring/src/lib.rs b/croaring/src/lib.rs index 6d17ccc..680262d 100644 --- a/croaring/src/lib.rs +++ b/croaring/src/lib.rs @@ -1,3 +1,8 @@ +#![deny(missing_docs)] +//! Rust wrapper for `CRoaring` (a C/C++ implementation at ) +//! +//! Provides Compressed Bitmaps, which act like a set of integers in an efficient way. + pub mod bitmap; pub mod bitset; pub mod treemap; diff --git a/croaring/src/treemap/iter.rs b/croaring/src/treemap/iter.rs index 7c587f0..d25504a 100644 --- a/croaring/src/treemap/iter.rs +++ b/croaring/src/treemap/iter.rs @@ -30,6 +30,9 @@ type InnerIter<'a> = iter::FlatMap< fn((&'a u32, &'a Bitmap)) -> To64Iter<'a>, >; +/// Iterator over values stored in the treemap +/// +/// Values are ordered in ascending order pub struct TreemapIterator<'a> { iter: InnerIter<'a>, } diff --git a/croaring/src/treemap/mod.rs b/croaring/src/treemap/mod.rs index 57eeca8..ca2aa53 100644 --- a/croaring/src/treemap/mod.rs +++ b/croaring/src/treemap/mod.rs @@ -31,7 +31,11 @@ mod util; pub use iter::TreemapIterator; pub use serialization::{Deserializer, Serializer}; +/// A RoaringBitmap-based structure that supports 64bit unsigned integer values +/// +/// Implemented as a [`BTreeMap`] of [`Bitmap`]s. #[derive(Clone, PartialEq, Eq)] pub struct Treemap { + /// The underlying map of bitmaps pub map: BTreeMap, }