Expand description
In-memory storage backend.
A non-persistent StorageBackend implementation using a BTreeMap
for ordered key access. Suitable for development, testing, and small datasets.
Thread-safe via [parking_lot::RwLock].
§Example
use cvx_core::{StorageBackend, TemporalPoint};
use cvx_storage::memory::InMemoryStore;
let store = InMemoryStore::new();
let point = TemporalPoint::new(42, 1000, vec![0.1, 0.2, 0.3]);
store.put(0, &point).unwrap();
let retrieved = store.get(42, 0, 1000).unwrap();
assert_eq!(retrieved.as_ref(), Some(&point));Structs§
- InMemory
Store - Non-persistent in-memory storage using a sorted
BTreeMap.
Type Aliases§
- Store
Key 🔒 - Composite key for the in-memory store:
(entity_id, space_id, timestamp).