Compatibility: features and pool types

perennial@0.1.0Updated 3 min readView as markdown

Spec: docs/spec/00-overview.md §2–§4. Legend and 01: labels: ../COMPAT.md. Rows here cover the proptest strategies, the Cargo features and the pool types; macros, modules, shared_ptr and the Generic* structs are in crate.md.

proptest strategies (feature proptest; length within size, lower inclusive, upper exclusive, per docs examples; not verified black-box by the spec agent)

item im 15.1 imbl 7 perennial status test
proptest::vector(element, size: Range<usize>) -> BoxedStrategy<Vector<_>> as im as im same tests/compat_crate_features.rs::proptest_vector
proptest::hash_map(key, value, size) -> BoxedStrategy<HashMap<_, _>> as im as im same tests/compat_crate_features.rs::proptest_hash_map
proptest::hash_set(element, size) -> BoxedStrategy<HashSet<_>> as im as im same tests/compat_crate_features.rs::proptest_hash_set
proptest::ord_map(key, value, size) -> BoxedStrategy<OrdMap<_, _>> as im as im same tests/compat_crate_features.rs::proptest_ord_map
proptest::ord_set(element, size) -> BoxedStrategy<OrdSet<_>> as im as im same tests/compat_crate_features.rs::proptest_ord_set

Cargo features (none on by default in the references)

item im 15.1 imbl 7 perennial status test
feature serde Serialize/Deserialize for all five yes yes same tests/compat_crate_features.rs::feature_serde
feature proptest strategies module yes yes same tests/compat_crate_features.rs::feature_proptest
feature quickcheck im; listed but unavailable in im-rc yes both crates (01:features) same tests/compat_crate_features.rs::feature_quickcheck
feature arbitrary arbitrary::Arbitrary impls yes yes same tests/compat_crate_features.rs::feature_arbitrary
feature rayon im; listed but unavailable in im-rc yes perennial only; Rc is not Send (01:features) same tests/compat_crate_features.rs::feature_rayon
feature debug Vector::assert_invariants also Vector::dot assert_invariants only same tests/compat_crate_features.rs::feature_debug
feature pool im-rc only (refpool) absent pool types and methods, size-only handles differs: no pooled allocation (01:pools) tests/compat_crate_features.rs::feature_pool
feature refpool (optional dependency) im and im-rc removed in 7.0 alias of feature pool; no refpool dependency differs: names the pool feature, pulls in no allocator (01:pool-sizes) tests/compat_crate_features.rs::feature_refpool
feature bincode absent bincode 2 impls not provided not provided: imbl-only, not in im's API; not in 0.1 (01:imbl-only) —
feature triomphe absent DefaultSharedPtr = ArcTK not provided not provided: imbl-only, not in im's API; not in 0.1 (01:imbl-only) —
feature small-chunks absent tuning knob, no public API not provided not provided: imbl-only, not in im's API; not in 0.1 (01:imbl-only) —
feature std (default on) absent absent supplies RandomState; without it, hash types need an explicit hasher differs: perennial-only, on by default, no_std + alloc otherwise (DESIGN.md) tests/compat_crate_features.rs::feature_std

Pool types (feature pool; im-rc upstream; im docs list the structs without the methods)

item im 15.1 imbl 7 perennial status test
HashMapPool<K, V> (type; Clone, Default) im-rc absent size-only handle differs: no pooled allocation (01:pools) tests/compat_crate_pool.rs::hash_map_pool
HashMapPool::new(size: usize) absent records size differs: handle only (01:pools) tests/compat_crate_pool.rs::hash_map_pool_new
HashMapPool::fill(&self) pre-fills the pool absent no allocation effect differs: no-op on memory (01:pools) tests/compat_crate_pool.rs::hash_map_pool_fill
HashMapPool::pool_size(&self) -> usize im-rc value semantics not specified absent size passed to new differs: reports the requested size, pools nothing (01:pool-sizes) tests/compat_crate_pool.rs::hash_map_pool_pool_size
HashSetPool<A> (type; Clone, Default) im-rc absent size-only handle differs: no pooled allocation (01:pools) tests/compat_crate_pool.rs::hash_set_pool
HashSetPool::new(size: usize) absent records size differs: handle only (01:pools) tests/compat_crate_pool.rs::hash_set_pool_new
HashSetPool::fill(&self) absent no allocation effect differs: no-op on memory (01:pools) tests/compat_crate_pool.rs::hash_set_pool_fill
HashSetPool::pool_size(&self) -> usize not specified absent size passed at construction differs: reports the requested size, pools nothing (01:pool-sizes) tests/compat_crate_pool.rs::hash_set_pool_pool_size
OrdMapPool<K, V> (type; Clone, Default) im-rc absent size-only handle differs: no pooled allocation (01:pools) tests/compat_crate_pool.rs::ord_map_pool
OrdMapPool::new(size: usize) absent records size differs: handle only (01:pools) tests/compat_crate_pool.rs::ord_map_pool_new
OrdMapPool::fill(&self) absent no allocation effect differs: no-op on memory (01:pools) tests/compat_crate_pool.rs::ord_map_pool_fill
OrdMapPool::pool_size(&self) -> usize not specified absent size passed at construction differs: reports the requested size, pools nothing (01:pool-sizes) tests/compat_crate_pool.rs::ord_map_pool_pool_size
OrdSetPool<A> (type; Clone, Default) im-rc absent size-only handle differs: no pooled allocation (01:pools) tests/compat_crate_pool.rs::ord_set_pool
OrdSetPool::new(size: usize) absent records size differs: handle only (01:pools) tests/compat_crate_pool.rs::ord_set_pool_new
OrdSetPool::fill(&self) absent no allocation effect differs: no-op on memory (01:pools) tests/compat_crate_pool.rs::ord_set_pool_fill
OrdSetPool::pool_size(&self) -> usize not specified absent size passed at construction differs: reports the requested size, pools nothing (01:pool-sizes) tests/compat_crate_pool.rs::ord_set_pool_pool_size
RRBPool<A> (type; Clone, Default) im-rc absent size-only handle differs: no pooled allocation (01:pools) tests/compat_crate_pool.rs::rrb_pool
RRBPool::new(size: usize) absent records size differs: handle only (01:pools) tests/compat_crate_pool.rs::rrb_pool_new
RRBPool::with_sizes(node, leaf, size_table) three pool sizes absent records the sizes differs: handle only (01:pools) tests/compat_crate_pool.rs::rrb_pool_with_sizes
RRBPool::fill(&self) absent no allocation effect differs: no-op on memory (01:pools) tests/compat_crate_pool.rs::rrb_pool_fill
RRBPool::node_pool_size(&self) -> usize not specified absent size passed at construction differs: reports the requested size, pools nothing (01:pool-sizes) tests/compat_crate_pool.rs::rrb_pool_node_pool_size
RRBPool::leaf_pool_size(&self) -> usize not specified absent size passed at construction differs: reports the requested size, pools nothing (01:pool-sizes) tests/compat_crate_pool.rs::rrb_pool_leaf_pool_size
RRBPool::size_table_pool_size(&self) -> usize not specified absent size passed at construction differs: reports the requested size, pools nothing (01:pool-sizes) tests/compat_crate_pool.rs::rrb_pool_size_table_pool_size