compact/
lib.rs

1//! This crate makes it possible to store objects containing dynamic fields
2//! either compactly in consecutive memory or using traditional heap pointers.
3//!
4//! Bread-and-butter datastructures are offered, they feature:
5//!
6//!   * transparent access semantics, independent of currently used storage
7//!   * automatic spill from exhausted compact storage to heap storage
8//!   * recursive re-compaction
9//!
10//! This is used in `Kay` for:
11//!
12//!   * Storing actor state compactly in one place for cache coherency and easy persistence
13//!   * Sending complex, dynamically-sized messages over boundaries
14//!     such as actors, threads and the network
15
16#![warn(missing_docs)]
17#![feature(specialization)]
18
19extern crate simple_allocator_trait;
20mod pointer_to_maybe_compact;
21mod compact;
22mod compact_option;
23mod compact_vec;
24mod compact_str;
25mod compact_dict;
26mod compact_hash_map;
27
28#[macro_use]
29extern crate lazy_static;
30
31#[cfg(feature = "serde-serialization")]
32extern crate serde;
33
34pub use self::compact::Compact;
35pub use self::compact_option::CompactOption as COption;
36pub use self::compact_vec::CompactVec as CVec;
37pub use self::compact_str::CompactString as CString;
38pub use self::compact_dict::CompactDict as CDict;
39pub use self::compact_hash_map::OpenAddressingMap as CHashMap;