pub struct PoolBuilder { /* private fields */ }
Expand description
Implementations§
Source§impl PoolBuilder
impl PoolBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Returns a new PoolBuilder
with the default settings.
Sourcepub fn path<P: AsRef<Path>>(self, path: P) -> Self
pub fn path<P: AsRef<Path>>(self, path: P) -> Self
Specify the path of the sqlite3 database to open.
By default, an in-memory database is used.
Sourcepub fn flags(self, flags: OpenFlags) -> Self
pub fn flags(self, flags: OpenFlags) -> Self
Specify the OpenFlags
to use when opening a new connection.
By default, OpenFlags::default()
is used.
Sourcepub fn journal_mode(self, journal_mode: JournalMode) -> Self
pub fn journal_mode(self, journal_mode: JournalMode) -> Self
Specify the JournalMode
to set when opening a new connection.
By default, no journal_mode
is explicity set.
Sourcepub fn num_conns(self, num_conns: usize) -> Self
pub fn num_conns(self, num_conns: usize) -> Self
Specify the number of sqlite connections to open as part of the pool.
Defaults to the number of logical CPUs of the current system.
Trait Implementations§
Source§impl Clone for PoolBuilder
impl Clone for PoolBuilder
Source§fn clone(&self) -> PoolBuilder
fn clone(&self) -> PoolBuilder
Returns a copy 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 PoolBuilder
impl Debug for PoolBuilder
Source§impl Default for PoolBuilder
impl Default for PoolBuilder
Source§fn default() -> PoolBuilder
fn default() -> PoolBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PoolBuilder
impl RefUnwindSafe for PoolBuilder
impl Send for PoolBuilder
impl Sync for PoolBuilder
impl Unpin for PoolBuilder
impl UnwindSafe for PoolBuilder
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