Expand description
§In-memory EnvironmentStore for tests
Volatile implementation of
crate::environment::environment_store::EnvironmentStore backed by a
HashMap for bundles/metadata and a BTreeMap for feedback (so range queries
over composite (location, post, feedback_type) keys work identically to the
disk store).
One subtlety: the decimation path needs to hold a write lock while also
iterating the bundle set, and Rust’s borrow rules don’t allow that directly.
The module uses an ouroboros self-referential struct to safely carry the
guard alongside the iterator, matching what the disk store gets from its
fjall cursor.
Structs§
- Locked
Post Bundle Iter - The self-referencing struct.
- MemEnvironment
Factory - MemEnvironment
Store - MemEnvironmentStore implements the
EnvironmentStoretrait for use during testing. Everything is stored in memory and is volatile to restarts.