Skip to main content

better_duck_core/asynchronous/
mod.rs

1//! Async facade over [`Connection`](crate::connection::Connection), gated by the
2//! `async` feature.
3//!
4//! This module is tokio-only: every method dispatches to
5//! `tokio::task::spawn_blocking`. There is no runtime-agnostic abstraction here —
6//! an async-std or smol user can reimplement [`AsyncConnection`] over their own
7//! blocking-task primitive in place of `spawn_blocking`; see its source for the
8//! pattern, which is small.
9
10mod connection;
11mod database;
12#[cfg(feature = "pool")]
13mod pool;
14
15pub use connection::AsyncConnection;
16pub use database::AsyncDatabase;
17#[cfg(feature = "pool")]
18pub use pool::AsyncPool;