Struct mobc::Connection
source · pub struct Connection<M: Manager> { /* private fields */ }
Expand description
A smart pointer wrapping a connection.
Implementations§
source§impl<M: Manager> Connection<M>
impl<M: Manager> Connection<M>
sourcepub fn is_brand_new(&self) -> bool
pub fn is_brand_new(&self) -> bool
Returns true is the connection is newly established.
sourcepub fn into_inner(self) -> M::Connection
pub fn into_inner(self) -> M::Connection
Unwraps the raw database connection.
Trait Implementations§
source§impl<M: Manager> Deref for Connection<M>
impl<M: Manager> Deref for Connection<M>
source§impl<M: Manager> DerefMut for Connection<M>
impl<M: Manager> DerefMut for Connection<M>
source§fn deref_mut(&mut self) -> &mut M::Connection
fn deref_mut(&mut self) -> &mut M::Connection
Mutably dereferences the value.
Auto Trait Implementations§
impl<M> !RefUnwindSafe for Connection<M>
impl<M> Send for Connection<M>
impl<M> Sync for Connection<M>where <M as Manager>::Connection: Sync,
impl<M> Unpin for Connection<M>where <M as Manager>::Connection: Unpin, <M as Manager>::Error: Unpin,
impl<M> !UnwindSafe for Connection<M>
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