pub struct SqlitePoolBuilder<'tempfile> { /* private fields */ }
Expand description
Helper around building a pool
Implementations§
Source§impl<'tempfile> SqlitePoolBuilder<'tempfile>
impl<'tempfile> SqlitePoolBuilder<'tempfile>
pub const fn new() -> Self
Sourcepub const fn db_path(self, path: &'tempfile Path) -> Self
pub const fn db_path(self, path: &'tempfile Path) -> Self
Set the db_path
It is expected that it is a reference to a path that should exist on disk,
and be visible by it’s filename.
The caller is expected to ensure that the file exists.
Sourcepub const fn db_connections(self, db_connections: Option<u32>) -> Self
pub const fn db_connections(self, db_connections: Option<u32>) -> Self
Set the amount of db_connections to use Use this to test if the connection count matters for SQLite on devices.
pub const fn db_timeout(self, db_timeout: Option<u32>) -> Self
pub const fn migrate(self, migrate: bool) -> Self
pub async fn build(self) -> Result<SqlitePool, Error>
Trait Implementations§
Auto Trait Implementations§
impl<'tempfile> Freeze for SqlitePoolBuilder<'tempfile>
impl<'tempfile> RefUnwindSafe for SqlitePoolBuilder<'tempfile>
impl<'tempfile> Send for SqlitePoolBuilder<'tempfile>
impl<'tempfile> Sync for SqlitePoolBuilder<'tempfile>
impl<'tempfile> Unpin for SqlitePoolBuilder<'tempfile>
impl<'tempfile> UnwindSafe for SqlitePoolBuilder<'tempfile>
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more