entidb_storage
Storage backend trait and implementations for EntiDB.
Overview
This crate provides the lowest-level storage abstraction for EntiDB. Storage backends are opaque byte stores - they do not interpret the data they store.
Design Principles
- Backends are simple byte stores (read, append, flush)
- No knowledge of EntiDB file formats, WAL, or segments
- Must be
Send + Syncfor concurrent access - EntiDB owns all file format interpretation
Available Backends
| Backend | Use Case |
|---|---|
InMemoryBackend |
Testing, ephemeral storage |
FileBackend |
Persistent storage using OS file APIs |
Usage
use ;
use Path;
// In-memory for tests
let mut memory = new;
let offset = memory.append.unwrap;
let data = memory.read_at.unwrap;
// File for persistence
let mut file = open.unwrap;
file.append.unwrap;
file.sync.unwrap; // Ensure durability
API
StorageBackend Trait
License
MIT OR Apache-2.0