Skip to main content

syncweb_core/
storage.rs

1pub mod config;
2pub mod node_db;
3pub mod stats_db;
4
5pub use config::{AdvancedConfig, BandwidthConfig, BepConfig, CacheConfig, Config, ParallelConfig};
6
7/// Common trait for database maintenance operations.
8pub trait Vacuumable {
9    /// Run VACUUM to reclaim space.
10    ///
11    /// # Errors
12    ///
13    /// Returns an error if the database operation fails.
14    fn vacuum(&self) -> crate::Result<()>;
15
16    /// Return the freelist page count (indicates whether VACUUM would help).
17    ///
18    /// # Errors
19    ///
20    /// Returns an error if the database operation fails.
21    fn freelist_count(&self) -> crate::Result<i64>;
22}