pub struct DatabaseConfig {
pub max_memtable_size_bytes: Option<usize>,
pub max_memtable_records: usize,
pub max_wal_size_bytes: Option<u64>,
pub max_total_disk_bytes: Option<u64>,
pub write_buffer_size: usize,
}Expand description
Database configuration for resource limits and operational parameters
Fields§
§max_memtable_size_bytes: Option<usize>Maximum memtable size in bytes (None = unlimited)
max_memtable_records: usizeMaximum number of records in memtable before flush
max_wal_size_bytes: Option<u64>Maximum WAL size in bytes (None = unlimited)
max_total_disk_bytes: Option<u64>Maximum total disk space in bytes (None = unlimited)
write_buffer_size: usizeWrite buffer size for WAL/SST writes
Implementations§
Source§impl DatabaseConfig
impl DatabaseConfig
Sourcepub fn with_max_memtable_size_bytes(self, size: usize) -> Self
pub fn with_max_memtable_size_bytes(self, size: usize) -> Self
Set maximum memtable size in bytes
Sourcepub fn with_max_memtable_records(self, records: usize) -> Self
pub fn with_max_memtable_records(self, records: usize) -> Self
Set maximum number of records in memtable
Sourcepub fn with_max_wal_size_bytes(self, size: u64) -> Self
pub fn with_max_wal_size_bytes(self, size: u64) -> Self
Set maximum WAL size in bytes
Sourcepub fn with_max_total_disk_bytes(self, size: u64) -> Self
pub fn with_max_total_disk_bytes(self, size: u64) -> Self
Set maximum total disk size in bytes
Sourcepub fn with_write_buffer_size(self, size: usize) -> Self
pub fn with_write_buffer_size(self, size: usize) -> Self
Set write buffer size
Trait Implementations§
Source§impl Clone for DatabaseConfig
impl Clone for DatabaseConfig
Source§fn clone(&self) -> DatabaseConfig
fn clone(&self) -> DatabaseConfig
Returns a duplicate of the value. Read more
1.0.0 · 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 DatabaseConfig
impl Debug for DatabaseConfig
Auto Trait Implementations§
impl Freeze for DatabaseConfig
impl RefUnwindSafe for DatabaseConfig
impl Send for DatabaseConfig
impl Sync for DatabaseConfig
impl Unpin for DatabaseConfig
impl UnwindSafe for DatabaseConfig
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