Expand description
§EnvironmentStore trait — pluggable server-side persistence
The contract every backend must implement: CRUD on post bundles, per-bundle
metadata, config, and aggregated feedback. Keeps the
crate::environment::environment::Environment facade independent of whether
the bytes actually live on disk (crate::environment::disk_environment_store)
or in RAM for tests (crate::environment::mem_environment_store).
Design notes:
- Last-accessed tracking on every read so decimation can evict coldest-first without a second pass.
- Composite feedback keys
(location_id, post_id, feedback_type)— the store only persists the write when the new entry’s PoW is at least as strong as the existing one, so backend can resolve merges without returning any state to the caller. - Config helpers (
get_config_usize/set_config_usize) for the small set of server tunables that outlive any single restart.