Struct bb8_tiberius::ConnectionManager
source · pub struct ConnectionManager { /* private fields */ }
Expand description
Implements bb8::ManageConnection
Implementations§
source§impl ConnectionManager
impl ConnectionManager
sourcepub fn build<I: IntoConfig>(config: I) -> Result<Self, Error>
pub fn build<I: IntoConfig>(config: I) -> Result<Self, Error>
Build a ConnectionManager
from e.g. an ADO string
sourcepub fn using_named_connection(self) -> Self
pub fn using_named_connection(self) -> Self
Use tiberius::SqlBrowser::connect_named
to establish the TCP stream
Trait Implementations§
source§impl ManageConnection for ConnectionManager
impl ManageConnection for ConnectionManager
§type Connection = Client<Compat<TcpStream>>
type Connection = Client<Compat<TcpStream>>
The connection type this manager deals with.
source§fn connect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Self::Connection, Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,
Attempts to create a new connection.
source§fn is_valid<'life0, 'life1, 'async_trait>(
&'life0 self,
conn: &'life1 mut Self::Connection
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn is_valid<'life0, 'life1, 'async_trait>( &'life0 self, conn: &'life1 mut Self::Connection ) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,
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.