pub struct DatabaseConfig {
pub url: String,
pub max_connections: u32,
pub min_connections: u32,
pub connect_timeout_secs: u64,
pub query_timeout_secs: u64,
pub enable_pooling: bool,
pub enable_query_logging: bool,
pub enable_migrations: bool,
pub migrations_dir: Option<String>,
}Expand description
Database configuration
Fields§
§url: StringDatabase URL
max_connections: u32Maximum number of connections
min_connections: u32Minimum number of connections
connect_timeout_secs: u64Connection timeout in seconds
query_timeout_secs: u64Query timeout in seconds
enable_pooling: boolEnable connection pooling
enable_query_logging: boolEnable query logging
enable_migrations: boolEnable migrations
migrations_dir: Option<String>Migrations directory
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 moreAuto 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