High-performance storage abstraction for Raft consensus Design principles: - Zero-cost abstractions through static dispatch - Physical separation of log and metadata stores - Async-ready for I/O parallelism - Minimal interface for maximum performance
| 22 | /// - Async-ready for I/O parallelism |
| 23 | /// - Minimal interface for maximum performance |
| 24 | pub trait StorageEngine: Send + Sync + 'static { |
| 25 | /// Associated log store type |
| 26 | type LogStore: LogStore; |
| 27 | |
| 28 | /// Associated metadata store type |
| 29 | type MetaStore: MetaStore; |
| 30 | |
| 31 | /// Get log storage handle |
| 32 | fn log_store(&self) -> Arc<Self::LogStore>; |
| 33 | |
| 34 | /// Get metadata storage handle |
| 35 | fn meta_store(&self) -> Arc<Self::MetaStore>; |
| 36 | } |
| 37 | |
| 38 | #[cfg_attr(any(test, feature = "__test_support"), automock)] |
| 39 | #[async_trait] |
nothing calls this directly
no outgoing calls
no test coverage detected