pub struct StorageConfig {Show 16 fields
pub base_path: PathBuf,
pub market_data_path: PathBuf,
pub file_prefix: String,
pub file_extension: String,
pub date_format: String,
pub rotate_at_midnight: bool,
pub enable_compression: bool,
pub compression_algorithm: String,
pub compression_level: u8,
pub compress_after_hours: u64,
pub delete_raw_after_compression: bool,
pub max_file_size_mb: u64,
pub max_batch_size: usize,
pub max_records_per_file: u64,
pub retention_days: u32,
pub rotation_check_interval_s: u64,
}Expand description
Storage and file management configuration
Fields§
§base_path: PathBufBase directory path for all data storage
market_data_path: PathBufSpecific path for market data files
file_prefix: StringPrefix for generated data files
file_extension: StringFile extension for data files
date_format: StringDate format string for file naming
rotate_at_midnight: boolWhether to rotate files at midnight
enable_compression: boolWhether to enable compression for stored data
compression_algorithm: StringCompression algorithm to use (e.g., “zstd”, “lz4”)
compression_level: u8Compression level (0-22 for zstd)
compress_after_hours: u64Hours after which to compress old files
delete_raw_after_compression: boolWhether to delete raw files after compression
max_file_size_mb: u64Maximum file size in megabytes before rotation
max_batch_size: usizeMaximum number of records to batch before writing
max_records_per_file: u64Maximum number of records per file before rotation
retention_days: u32Number of days to retain data files
rotation_check_interval_s: u64Interval in seconds for checking rotation conditions
Trait Implementations§
Source§impl Clone for StorageConfig
impl Clone for StorageConfig
Source§fn clone(&self) -> StorageConfig
fn clone(&self) -> StorageConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StorageConfig
impl Debug for StorageConfig
Source§impl Default for StorageConfig
impl Default for StorageConfig
Source§fn default() -> StorageConfig
fn default() -> StorageConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for StorageConfig
impl<'de> Deserialize<'de> for StorageConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for StorageConfig
impl RefUnwindSafe for StorageConfig
impl Send for StorageConfig
impl Sync for StorageConfig
impl Unpin for StorageConfig
impl UnwindSafe for StorageConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more