hopper_core/collections/mod.rs
1//! Zero-copy collections for on-chain account data.
2//!
3//! All collections operate directly on byte slices -- no heap allocation,
4//! no `Vec`, no `Box`. They are BPF-safe, deterministic, and audit-friendly.
5//!
6//! ## Available Collections
7//!
8//! - [`FixedVec`] -- Bounded dynamic array with push/pop/swap_remove
9//! - [`RingBuffer`] -- Fixed-capacity circular buffer for journals/logs
10//! - [`SlotMap`] -- Fixed-slot map with generation counters for safe handles
11//! - [`BitSet`] -- Compact bit array for flags and bitmask operations
12
13mod bit_set;
14mod fixed_vec;
15mod ring_buffer;
16mod slot_map;
17mod sorted_vec;
18
19pub use bit_set::BitSet;
20pub use fixed_vec::FixedVec;
21pub use ring_buffer::RingBuffer;
22pub use slot_map::SlotMap;
23pub use sorted_vec::SortedVec;
24
25mod packed_map;
26pub use packed_map::PackedMap;
27
28pub mod journal;
29pub use journal::{Journal, JournalReader, JOURNAL_HEADER_SIZE};
30
31pub mod slab;
32pub use slab::{bitmap_bytes, Slab, SLAB_HEADER_SIZE};