[][src]Struct diesel::r2d2::PooledConnection

pub struct PooledConnection<M> where
    M: ManageConnection
{ /* fields omitted */ }

A smart pointer wrapping a connection.

Trait Implementations

impl<M> Deref for PooledConnection<M> where
    M: ManageConnection
[src]

type Target = <M as ManageConnection>::Connection

The resulting type after dereferencing.

impl<M> DerefMut for PooledConnection<M> where
    M: ManageConnection
[src]

impl<M> Debug for PooledConnection<M> where
    M: ManageConnection,
    <M as ManageConnection>::Connection: Debug
[src]

impl<M> Drop for PooledConnection<M> where
    M: ManageConnection
[src]

impl<T> SimpleConnection for PooledConnection<ConnectionManager<T>> where
    T: Connection + Send + 'static, 
[src]

impl<C> Connection for PooledConnection<ConnectionManager<C>> where
    C: Connection<TransactionManager = AnsiTransactionManager> + Send + 'static,
    C::Backend: UsesAnsiSavepointSyntax
[src]

type Backend = C::Backend

The backend this type connects to

type TransactionManager = C::TransactionManager

fn transaction<T, E, F>(&self, f: F) -> Result<T, E> where
    F: FnOnce() -> Result<T, E>,
    E: From<Error>, 
[src]

Executes the given function inside of a database transaction Read more

fn begin_test_transaction(&self) -> QueryResult<()>[src]

Creates a transaction that will never be committed. This is useful for tests. Panics if called while inside of a transaction. Read more

fn test_transaction<T, E, F>(&self, f: F) -> T where
    F: FnOnce() -> Result<T, E>,
    E: Debug
[src]

Executes the given function inside a transaction, but does not commit it. Panics if the given function returns an error. Read more

Auto Trait Implementations

impl<M> Unpin for PooledConnection<M> where
    <M as ManageConnection>::Connection: Unpin

impl<M> Sync for PooledConnection<M> where
    <M as ManageConnection>::Connection: Send + Sync

impl<M> Send for PooledConnection<M> where
    <M as ManageConnection>::Connection: Send

impl<M> !UnwindSafe for PooledConnection<M>

impl<M> !RefUnwindSafe for PooledConnection<M>

Blanket Implementations

impl<T> IntoSql for T[src]

fn into_sql<T>(self) -> AsExprOf<Self, T> where
    Self: AsExpression<T> + Sized
[src]

Convert self to an expression for Diesel's query builder. Read more

fn as_sql<'a, T>(&'a self) -> AsExprOf<&'a Self, T> where
    &'a Self: AsExpression<T>, 
[src]

Convert &self to an expression for Diesel's query builder. Read more

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]