Expand description
frp-persistence — durable storage backend for infinite-db frp.
Implements the [AtomStore], [BlockStore], and [EdgeStore] traits from
frp-loom using infinite-db
as the on-disk storage engine.
§Quick-start
use frp_persistence::InfiniteDbStore;
use frp_loom::store::AtomStore;
let mut store = InfiniteDbStore::open("./data").unwrap();
// put / get / delete atoms, blocks, edges through the store traits…
store.flush().unwrap();§Design notes
- Write-through cache — the store traits return
&Self::Atomborrowed references, so deserialized values must live inside the struct. All reads are served from in-memoryHashMaps; writes go to both the cache and the WAL. EdgeTransform::Inlineclosures are not serializable and round-trip asPassThrough. Re-attach closures after loading a graph from the store.- Call
InfiniteDbStore::flushbefore process exit to seal WAL records into on-disk blocks.
Re-exports§
pub use error::PersistenceError;pub use store::InfiniteDbStore;