pub struct PoolConfig {
pub busy_timeout_ms: u32,
pub wal_autocheckpoint: u32,
pub enable_wal: bool,
pub max_read_connections: usize,
pub reader_timeout_secs: u64,
}Expand description
Connection pool configuration for SQLite.
Controls busy timeout and WAL checkpoint behavior. These defaults are tuned for a single-process server on local SSD storage.
Fields§
§busy_timeout_ms: u32SQLite busy timeout in milliseconds. Default: 5000 (5 seconds).
wal_autocheckpoint: u32WAL auto-checkpoint threshold in pages. Default: 1000 (~4 MB with 4KB pages).
enable_wal: boolEnable WAL mode. Should almost always be true. Default: true.
max_read_connections: usizeNumber of reader connections kept in the pool. Writes still flow through a single writer connection because SQLite allows only one concurrent writer, but readers can proceed concurrently under WAL semantics.
reader_timeout_secs: u64Timeout in seconds for acquiring a reader connection from the pool. Default: 30 seconds.
Trait Implementations§
Source§impl Clone for PoolConfig
impl Clone for PoolConfig
Source§fn clone(&self) -> PoolConfig
fn clone(&self) -> PoolConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 PoolConfig
impl Debug for PoolConfig
Source§impl Default for PoolConfig
impl Default for PoolConfig
Source§impl<'de> Deserialize<'de> for PoolConfig
impl<'de> Deserialize<'de> for PoolConfig
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 PoolConfig
impl RefUnwindSafe for PoolConfig
impl Send for PoolConfig
impl Sync for PoolConfig
impl Unpin for PoolConfig
impl UnsafeUnpin for PoolConfig
impl UnwindSafe for PoolConfig
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