Expand description
§Enter the Data Zoo
A collection of data structures interesting enough to put in free range pens.
§Features
This is a collection of multimaps, jagged arrays, bit sets, and combination thereof.
Highlights:
- A storage-agnostic Bitset.
- A storage-agnostic JaggedArray.
- A PackedIntArraysimilar tobitpacking,bitvecand other bitpacking rust crates.
- A bi-directional read-only multimap: BimultiMap
- enumset-keyed data structures.
See rustdoc documentation for details.
§Cargo Features
- enumset: enables the- enumsetdependency and the- EnumBitMatrix- EnumMultimapdata structures
- smallvec: (off by default) Implement- bitset::ExtendBlockson- SmallVec.
§Unique features
- JaggedArrayis generic over storage types, which means you can take advantage of your own specialized- sliceimpl such as- SmallVec, or a fixed sze array stored on the stack (typically useful if you have a fixed height matrix).
- Bitsetis also generic over storage type, with the same implications.
§Limitations
- Data structures do not handle Droptypes at all.
- Data structures are untested with sizes > u32::MAX
- Effort is made to panic in those situations though, but you never know
- Generally assumes size_of(usize) >= size_of(u32)
- Definitively not as tested and benchmarked as other similar crates.
- No #[no_std]but I don’t see why this couldn’t be added as a feature
- depends on sorted-iter, can’t disable dependency.
- Bitsetgenerally doesn’t distinguish between “disabled within bound” and “out of bound”.
§History
This was first built for the cuicui_richtext project, but became useful for
other things, so it got published separately.
§License
You may use datazoo under any of the following licenses:
- ZLib
- MIT
- Apache 2.0
Re-exports§
- pub use bimultimap::Bimultimap;
- pub use bitmatrix::BitMatrix;
- pub use bitset::Bitset;
- pub use enum_bitmatrix::EnumBitMatrix;
- pub use enum_multimap::EnumMultimap;
- pub use index_multimap::IndexMultimap;
- pub use jagged_array::JaggedArray;
- pub use jagged_bitset::JaggedBitset;
- pub use jagged_vec::JaggedVec;
- pub use packed_int_array::PackedIntArray;
Modules§
- bimultimap
- A read-only bi-directional multimap.
- bitmatrix
- A bitset with fixed-size rows.
- bitset
- A slice of u32accessed on the bit level.
- enum_bitmatrix 
- A bitset similar to BitMatrix, indexed byEnumSetType.
- enum_multimap 
- A multimap optimized for EnumSetTypekeys.
- index_multimap 
- A multimap that goes from an integer to multiple integers.
- jagged_array 
- A variable length matrix optimized for read-only rows.
- jagged_bitset 
- A bit matrix similar to BitMatrix, but with columns of variable length likeJaggedVec.
- jagged_vec 
- An extensible (ie: can add more rows) jagged array.
- packed_int_ array 
- An associative array of small integers.
- sorted
- Types marking slices as being sorted.
Traits§
- AssumeSorted ByItem Ext 
- extension trait for any iterator to add a assume_sorted_by_item method
- AssumeSorted ByKey Ext 
- extension trait for any iterator of pairs to add a assume_sorted_by_key method
- Index
- A type that can be cast into an index.
- SortedByItem 
- marker trait for iterators that are sorted by their Item
- SortedByKey 
- marker trait for iterators that are sorted by the key of their Item
- SortedIterator 
- set operations for iterators where the items are sorted according to the natural order
- SortedPair Iterator 
- relational operations for iterators of pairs where the items are sorted according to the key