pub struct ConnectionManager { /* private fields */ }
Expand description
The manager for a MSSQL connection pool
Implementations§
Source§impl ConnectionManager
impl ConnectionManager
pub fn new(cfg: &DatabaseConfig<'_>) -> Result<Self, Error>
Trait Implementations§
Source§impl ManageConnection for ConnectionManager
impl ManageConnection for ConnectionManager
Source§type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
Source§fn connect(&self) -> Result<Self::Connection, Self::Error>
fn connect(&self) -> Result<Self::Connection, Self::Error>
Attempts to create a new connection.
Source§fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
fn is_valid(&self, conn: &mut Self::Connection) -> Result<(), Self::Error>
Determines if the connection is still connected to the database. Read more
Source§fn has_broken(&self, _conn: &mut Self::Connection) -> bool
fn has_broken(&self, _conn: &mut Self::Connection) -> bool
Quickly determines if the connection is no longer usable. Read more
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