pub struct DbConfig {
pub path: String,
pub tiered_mode: bool,
pub sync_mode: bool,
pub hot_threshold: usize,
pub rate_limit_requests: u32,
pub rate_limit_window: u64,
pub max_body_size: usize,
pub encryption_key: Option<[u8; 32]>,
pub post_backup_script: Option<String>,
}Fields§
§path: StringPath to the database file (e.g., “my_database.log”)
tiered_mode: boolEnable tiered storage (hot + cold log)
sync_mode: boolForce synchronous writes (no data loss, lower performance)
hot_threshold: usizeMax documents to keep in RAM per collection
rate_limit_requests: u32Rate limiting: max requests per window
rate_limit_window: u64Rate limiting: window size in seconds
max_body_size: usizeMax request body size in bytes
encryption_key: Option<[u8; 32]>Optional encryption key (32 bytes)
post_backup_script: Option<String>Optional script to run after backups
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DbConfig
impl<'de> Deserialize<'de> for DbConfig
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 DbConfig
impl RefUnwindSafe for DbConfig
impl Send for DbConfig
impl Sync for DbConfig
impl Unpin for DbConfig
impl UnsafeUnpin for DbConfig
impl UnwindSafe for DbConfig
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