Struct butane::db::r2::ConnectionManager
source · pub struct ConnectionManager { /* private fields */ }
Expand description
R2D2 support for Butane. Implements r2d2::ManageConnection
.
Implementations§
source§impl ConnectionManager
impl ConnectionManager
pub fn new(spec: ConnectionSpec) -> ConnectionManager
Trait Implementations§
source§impl Debug for ConnectionManager
impl Debug for ConnectionManager
source§impl ManageConnection for ConnectionManager
impl ManageConnection for ConnectionManager
§type Connection = Connection
type Connection = Connection
The connection type this manager deals with.
source§fn connect(
&self
) -> Result<<ConnectionManager as ManageConnection>::Connection, Error>
fn connect( &self ) -> Result<<ConnectionManager as ManageConnection>::Connection, Error>
Attempts to create a new connection.
source§fn is_valid(
&self,
conn: &mut <ConnectionManager as ManageConnection>::Connection
) -> Result<(), Error>
fn is_valid( &self, conn: &mut <ConnectionManager as ManageConnection>::Connection ) -> Result<(), Error>
Determines if the connection is still connected to the database. Read more
source§fn has_broken(
&self,
conn: &mut <ConnectionManager as ManageConnection>::Connection
) -> bool
fn has_broken( &self, conn: &mut <ConnectionManager as ManageConnection>::Connection ) -> bool
Quickly determines if the connection is no longer usable. Read more
Auto Trait Implementations§
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