Module sync_connection_wrapper

Module sync_connection_wrapper 

Source
Available on crate feature sync-connection-wrapper only.
Expand description

This module contains a wrapper type that provides a crate::AsyncConnection implementation for types that implement diesel::Connection. Using this type might be useful for the following usecases:

  • using a sync Connection implementation in async context
  • using the same code base for async crates needing multiple backends

Structs§

SyncTransactionManagerWrapper
A wrapper of a diesel transaction manager usable in async context.

Traits§

SpawnBlocking
This is a helper trait that allows to customize the spawning blocking tasks as part of the SyncConnectionWrapper type. By default a tokio runtime and its spawn_blocking function is used.

Type Aliases§

SyncConnectionWrappertokio
A wrapper of a diesel::connection::Connection usable in async context.