Crate compact[−][src]
This crate makes it possible to store objects containing dynamic fields either compactly in consecutive memory or using traditional heap pointers.
Bread-and-butter datastructures are offered, they feature:
- transparent access semantics, independent of currently used storage
- automatic spill from exhausted compact storage to heap storage
- recursive re-compaction
This is used in Kay
for:
- Storing actor state compactly in one place for cache coherency and easy persistence
- Sending complex, dynamically-sized messages over boundaries such as actors, threads and the network
Structs
CDict |
A simple linear-search key-value dictionary,
implemented using two |
CHashMap |
A dynamically-sized open adressing quadratic probing hashmap
that can be stored in compact sequential storage and
automatically spills over into free heap storage using |
COption |
A wrapper to make an |
CString |
A compact storage for a |
CVec |
A dynamically-sized vector that can be stored in compact sequential storage and
automatically spills over into free heap storage using |
Traits
Compact |
A trait for objects with a statically-sized part and a potential dynamically-sized part that can be stored both compactly in consecutive memory or freely on the heap |