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> Freeze for Connection<M>
impl<M> !RefUnwindSafe for Connection<M>
impl<M> Send for Connection<M>
impl<M> Sync for Connection<M>
impl<M> Unpin for Connection<M>
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