[][src]Struct bb8_diesel::DieselConnection

pub struct DieselConnection<C>(_);

An async-safe analogue of any connection that implements diesel::Connection.

All blocking methods within this type delegate to block_in_place. The number of threads is not unbounded, however, as they are controlled by the truly asynchronous bb8::Pool owner. This type makes it easy to use diesel without fear of blocking the runtime and without fear of spawning too many child threads.

Note that trying to construct this type via Connection::establish will panic. The only correct way to construct this type is by using a bb8 pool.

Trait Implementations

impl<C> Connection for DieselConnection<C> where
    C: Connection<TransactionManager = AnsiTransactionManager>,
    C::Backend: UsesAnsiSavepointSyntax
[src]

type Backend = C::Backend

The backend this type connects to

type TransactionManager = AnsiTransactionManager

impl<C> Deref for DieselConnection<C>[src]

type Target = C

The resulting type after dereferencing.

impl<C> DerefMut for DieselConnection<C>[src]

impl<C> SimpleConnection for DieselConnection<C> where
    C: SimpleConnection
[src]

Auto Trait Implementations

impl<C> RefUnwindSafe for DieselConnection<C> where
    C: RefUnwindSafe

impl<C> Send for DieselConnection<C> where
    C: Send

impl<C> Sync for DieselConnection<C> where
    C: Sync

impl<C> Unpin for DieselConnection<C> where
    C: Unpin

impl<C> UnwindSafe for DieselConnection<C> where
    C: UnwindSafe

Blanket Implementations

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

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

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

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

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

impl<T> IntoSql for 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.