pub struct StorageConfig {
pub data_dir: PathBuf,
pub retention_days: u32,
pub purge_schedule: String,
pub auto_purge_enabled: bool,
pub purge_batch_size: usize,
}Expand description
Storage configuration
Fields§
§data_dir: PathBufData directory path
retention_days: u32Retention period in days (1-365)
purge_schedule: StringPurge schedule (cron-like format)
auto_purge_enabled: boolEnable automatic purging
purge_batch_size: usizeBatch size for purge operations
Implementations§
Source§impl StorageConfig
impl StorageConfig
pub fn default_data_dir() -> PathBuf
Sourcepub fn with_data_dir(self, data_dir: PathBuf) -> Self
pub fn with_data_dir(self, data_dir: PathBuf) -> Self
Builder method to set data directory
Sourcepub fn with_retention_days(self, days: u32) -> Self
pub fn with_retention_days(self, days: u32) -> Self
Builder method to set retention days
Sourcepub fn with_purge_schedule(self, schedule: String) -> Self
pub fn with_purge_schedule(self, schedule: String) -> Self
Builder method to set purge schedule
Sourcepub fn with_auto_purge(self, enabled: bool) -> Self
pub fn with_auto_purge(self, enabled: bool) -> Self
Builder method to enable/disable auto purge
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 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
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§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 UnsafeUnpin 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