Trait bb8::ManageConnection [−][src]
pub trait ManageConnection: Sized + Send + Sync + 'static { type Connection: Send + 'static; type Error: Debug + Send + 'static; fn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait; fn is_valid<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
conn: &'life1 mut PooledConnection<'life2, Self>
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Self: 'async_trait; fn has_broken(&self, conn: &mut Self::Connection) -> bool; }
Expand description
A trait which provides connection-specific functionality.
Associated Types
type Connection: Send + 'static
type Connection: Send + 'static
The connection type this manager deals with.
Required methods
Attempts to create a new connection.
Determines if the connection is still connected to the database.
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.