pub struct SqliteManager { /* private fields */ }Expand description
bb8 manager for SQLite connections.
Implementations§
Source§impl SqliteManager
impl SqliteManager
pub fn new(db_path: String) -> Self
Sourcepub async fn build_pool(
self,
) -> Result<Pool<SqliteManager>, SqlMiddlewareDbError>
pub async fn build_pool( self, ) -> Result<Pool<SqliteManager>, SqlMiddlewareDbError>
Trait Implementations§
Source§impl ManageConnection for SqliteManager
impl ManageConnection for SqliteManager
Source§type Connection = Arc<SqliteWorker>
type Connection = Arc<SqliteWorker>
The connection type this manager deals with.
Source§type Error = SqlMiddlewareDbError
type Error = SqlMiddlewareDbError
The error type returned by
Connections.Source§fn connect(
&self,
) -> impl Future<Output = Result<Self::Connection, Self::Error>> + Send
fn connect( &self, ) -> impl Future<Output = Result<Self::Connection, Self::Error>> + Send
Attempts to create a new connection.
Source§fn is_valid(
&self,
conn: &mut Self::Connection,
) -> impl Future<Output = Result<(), Self::Error>> + Send
fn is_valid( &self, conn: &mut Self::Connection, ) -> impl Future<Output = Result<(), Self::Error>> + Send
Determines if the connection is still connected to the database.
Source§fn has_broken(&self, conn: &mut Self::Connection) -> bool
fn has_broken(&self, conn: &mut Self::Connection) -> bool
Synchronously determine if the connection is no longer usable, if possible.
Auto Trait Implementations§
impl Freeze for SqliteManager
impl RefUnwindSafe for SqliteManager
impl Send for SqliteManager
impl Sync for SqliteManager
impl Unpin for SqliteManager
impl UnwindSafe for SqliteManager
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