Skip to main content

moonpool_sim/storage/
mod.rs

1//! Storage simulation and configuration.
2//!
3//! This module provides simulated storage that integrates with the
4//! deterministic simulation engine for testing disk I/O patterns and faults.
5
6/// Storage configuration and settings
7pub mod config;
8
9/// Storage error types
10pub mod error;
11
12/// Storage operation events
13pub mod events;
14
15/// Storage file implementation
16pub mod file;
17
18/// Future types for async storage operations
19pub mod futures;
20
21/// In-memory storage with deterministic fault injection
22pub mod memory;
23
24/// Storage provider implementation
25pub mod provider;
26
27use std::io;
28
29/// Create an io::Error for simulation shutdown.
30///
31/// Used by storage futures and file operations when the simulation has been dropped.
32pub(crate) fn sim_shutdown_error() -> io::Error {
33    io::Error::new(io::ErrorKind::BrokenPipe, "simulation shutdown")
34}
35
36// Re-export error
37pub use error::StorageError;
38
39// Re-export configuration
40pub use config::StorageConfiguration;
41
42// Re-export events
43pub use events::StorageOperation;
44
45// Re-export file
46pub use file::SimStorageFile;
47
48// Re-export memory storage
49pub use memory::{InMemoryStorage, SECTOR_SIZE, SectorBitSet};
50
51// Re-export provider
52pub use provider::SimStorageProvider;