pub struct DatabaseConfig {
pub columns: u32,
pub flags: OpenFlags,
pub num_conns: usize,
pub vacuum_mode: VacuumMode,
}Expand description
Database configuration
Fields§
§columns: u32Set number of columns. The number of columns must not be zero.
flags: OpenFlagsSet flags used to open the database
num_conns: usizeNumber of connections to open
vacuum_mode: VacuumModeVacuum mode
Implementations§
Source§impl DatabaseConfig
impl DatabaseConfig
Sourcepub fn with_columns(self, columns: u32) -> Self
pub fn with_columns(self, columns: u32) -> Self
Set the number of columns. columns must not be zero.
Sourcepub fn with_in_memory(self) -> Self
pub fn with_in_memory(self) -> Self
Sets the flags to ‘in-memory database’
Sourcepub fn with_flags(self, flags: OpenFlags) -> Self
pub fn with_flags(self, flags: OpenFlags) -> Self
Replaces all the flags
Sourcepub fn with_num_conns(self, num_conns: usize) -> Self
pub fn with_num_conns(self, num_conns: usize) -> Self
Sets the number of connections for this database
Sourcepub fn with_vacuum_mode(self, vacuum_mode: VacuumMode) -> Self
pub fn with_vacuum_mode(self, vacuum_mode: VacuumMode) -> Self
Set the vacuum mode used by ‘cleanup’
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 Default for DatabaseConfig
impl Default for DatabaseConfig
Source§fn default() -> DatabaseConfig
fn default() -> DatabaseConfig
Returns the “default value” for a type. Read more
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