pub struct SqlitePoolBuilder { /* private fields */ }Expand description
Builder for creating a connection pool.
Implementations§
Source§impl SqlitePoolBuilder
impl SqlitePoolBuilder
Sourcepub fn config(self, config: SqliteConfig) -> Self
pub fn config(self, config: SqliteConfig) -> Self
Set the configuration.
Sourcepub fn max_connections(self, n: usize) -> Self
pub fn max_connections(self, n: usize) -> Self
Set the maximum number of connections.
Sourcepub fn connection_timeout(self, timeout: Duration) -> Self
pub fn connection_timeout(self, timeout: Duration) -> Self
Set the connection timeout.
Sourcepub fn idle_timeout(self, timeout: Duration) -> Self
pub fn idle_timeout(self, timeout: Duration) -> Self
Set the idle timeout.
Sourcepub async fn build(self) -> SqliteResult<SqlitePool>
pub async fn build(self) -> SqliteResult<SqlitePool>
Build the connection pool.
Trait Implementations§
Source§impl Debug for SqlitePoolBuilder
impl Debug for SqlitePoolBuilder
Source§impl Default for SqlitePoolBuilder
impl Default for SqlitePoolBuilder
Source§fn default() -> SqlitePoolBuilder
fn default() -> SqlitePoolBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SqlitePoolBuilder
impl RefUnwindSafe for SqlitePoolBuilder
impl Send for SqlitePoolBuilder
impl Sync for SqlitePoolBuilder
impl Unpin for SqlitePoolBuilder
impl UnwindSafe for SqlitePoolBuilder
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