deadpool_diesel/
lib.rs

1#![doc = include_str!("../README.md")]
2#![cfg_attr(docsrs, feature(doc_cfg))]
3#![deny(
4    nonstandard_style,
5    rust_2018_idioms,
6    rustdoc::broken_intra_doc_links,
7    rustdoc::private_intra_doc_links
8)]
9#![forbid(non_ascii_idents, unsafe_code)]
10#![warn(
11    deprecated_in_future,
12    missing_copy_implementations,
13    missing_debug_implementations,
14    missing_docs,
15    unreachable_pub,
16    unused_import_braces,
17    unused_labels,
18    unused_lifetimes,
19    unused_qualifications,
20    unused_results
21)]
22#![allow(clippy::uninlined_format_args)]
23
24mod error;
25mod manager;
26
27#[cfg(feature = "mysql")]
28#[cfg_attr(docsrs, doc(cfg(feature = "mysql")))]
29pub mod mysql;
30#[cfg(feature = "postgres")]
31#[cfg_attr(docsrs, doc(cfg(feature = "postgres")))]
32pub mod postgres;
33#[cfg(feature = "sqlite")]
34#[cfg_attr(docsrs, doc(cfg(feature = "sqlite")))]
35pub mod sqlite;
36
37use deadpool::managed;
38
39pub use deadpool::managed::reexports::*;
40pub use deadpool_sync::reexports::*;
41// Normally backend implementations don't export the generic `Pool`
42// type. `deadpool-diesel` is different in that regards as it is
43// generic itself.
44pub use deadpool::managed::Pool;
45
46pub use self::{
47    error::Error,
48    manager::{Manager, ManagerConfig, RecycleCheckCallback, RecyclingMethod},
49};
50
51/// Type alias for using [`deadpool::managed::PoolError`] with [`diesel`].
52pub type PoolError = managed::PoolError<Error>;
53
54/// Connection which is returned by the [`Pool`].
55pub type Connection<C> = deadpool_sync::SyncWrapper<C>;