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 operation events
10pub mod events;
11
12/// Storage file implementation
13pub mod file;
14
15/// Future types for async storage operations
16pub mod futures;
17
18/// In-memory storage with deterministic fault injection
19pub mod memory;
20
21/// Storage provider implementation
22pub mod provider;
23
24use std::io;
25
26/// Create an io::Error for simulation shutdown.
27///
28/// Used by storage futures and file operations when the simulation has been dropped.
29pub(crate) fn sim_shutdown_error() -> io::Error {
30    io::Error::new(io::ErrorKind::BrokenPipe, "simulation shutdown")
31}
32
33// Re-export configuration
34pub use config::StorageConfiguration;
35
36// Re-export events
37pub use events::StorageOperation;
38
39// Re-export file
40pub use file::SimStorageFile;
41
42// Re-export memory storage
43pub use memory::{InMemoryStorage, SECTOR_SIZE, SectorBitSet};
44
45// Re-export provider
46pub use provider::SimStorageProvider;