/deadpool-diesel-async

Primary LanguageRustApache License 2.0Apache-2.0

deadpool-diesel-async

NOTE: Use of this crate should be deprecated in favor of diesel-async's deadpool integration.

A deadpool backend implementation for the upcoming diesel-async crate. This provides async connection pooling of async diesel connections. It currently only supports the tokio async runtime as that's the only one supported by diesel-async.

The two main structs exported are:

  • Manager: implements the deadpool::managed::Manager trait
  • AsyncDieselConnection - modeled off of deadpool-sync's SyncWrapper, this is the object which will effectively be returned from deadpool::managed::Pool.get and can access a mutable reference to an AsyncPgConnection/AsyncMysqlConnection through a callback passed to its interact method