[−][src]Trait bb8::ManageConnection
A trait which provides connection-specific functionality.
Associated Types
type Connection: Send + 'static
The connection type this manager deals with.
type Error: Send + 'static
The error type returned by Connection
s.
Required methods
fn connect(
&self
) -> Box<dyn Future<Item = Self::Connection, Error = Self::Error> + Send>
&self
) -> Box<dyn Future<Item = Self::Connection, Error = Self::Error> + Send>
Attempts to create a new connection.
fn is_valid(
&self,
conn: Self::Connection
) -> Box<dyn Future<Item = Self::Connection, Error = (Self::Error, Self::Connection)> + Send>
&self,
conn: Self::Connection
) -> Box<dyn Future<Item = Self::Connection, Error = (Self::Error, Self::Connection)> + Send>
Determines if the connection is still connected to the database.
fn has_broken(&self, conn: &mut Self::Connection) -> bool
Synchronously determine if the connection is no longer usable, if possible.