pub struct DbConfig {
pub path: String,
pub tiered_mode: bool,
pub sync_mode: bool,
pub hot_threshold: usize,
pub rate_limit_requests: Option<u32>,
pub rate_limit_window: Option<u64>,
pub max_body_size: usize,
pub max_keys_per_request: usize,
pub encryption_key: Option<[u8; 32]>,
pub post_backup_script: Option<String>,
pub in_memory: bool,
}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: Option<u32>Rate limiting: max requests per window (server-only, None = disabled/use default)
rate_limit_window: Option<u64>Rate limiting: window size in seconds (server-only, None = disabled/use default)
max_body_size: usizeMax request body size in bytes
max_keys_per_request: usizeMax keys allowed per request (default: 1000)
encryption_key: Option<[u8; 32]>Optional encryption key (32 bytes)
post_backup_script: Option<String>Optional script to run after backups
in_memory: boolRun entirely in RAM — no disk I/O, all data lost on exit
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