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
Source§async fn connect(&self) -> Result<Self::Connection, Self::Error>
async fn connect(&self) -> Result<Self::Connection, Self::Error>
Attempts to create a new connection.
Source§async fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
async fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
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 ConnectionManager
impl !RefUnwindSafe for ConnectionManager
impl Send for ConnectionManager
impl Sync for ConnectionManager
impl Unpin for ConnectionManager
impl !UnwindSafe for ConnectionManager
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