1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
//! # EntiDB Storage
//!
//! Storage backend trait and implementations for EntiDB.
//!
//! 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 + Sync` for concurrent access
//! - EntiDB owns all file format interpretation
//!
//! ## Available Backends
//!
//! - [`InMemoryBackend`] - For testing and ephemeral storage
//! - [`FileBackend`] - For persistent storage using OS file APIs
//! - [`EncryptedBackend`] - Wrapper that adds AES-256-GCM encryption
//!
//! ## Example
//!
//! ```rust
//! use entidb_storage::{StorageBackend, InMemoryBackend};
//!
//! let mut backend = InMemoryBackend::new();
//! let offset = backend.append(b"hello world").unwrap();
//! let data = backend.read_at(offset, 11).unwrap();
//! assert_eq!(&data, b"hello world");
//! ```
// Production code MUST NOT use panic!/unwrap()/expect() - see docs/invariants.md
pub use StorageBackend;
pub use ;
pub use ;
pub use FileBackend;
pub use InMemoryBackend;