Registry / database / deadpool

deadpool

JSON →
library0.13.0rscratesunverified

Dead simple async connection pool for managing database connections and other resources.

# Cargo.toml [dependencies] deadpool = "0.13.0"
INSTALL
IMPORT
SIG · DEADPOOL
D
deadpool
databaserustv0.13.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pool
use deadpool::managed::Pool;

Creates a simple async connection pool with a custom manager.

use deadpool::managed::{Pool, Manager}; struct MyManager; impl Manager for MyManager { type Type = String; type Error = std::io::Error; async fn create(&self) -> Result<String, Self::Error> { Ok("connection".to_string()) } async fn recycle(&self, _: &mut String) -> Result<(), Self::Error> { Ok(()) } } let pool = Pool::builder(MyManager).max_size(10).build().unwrap(); let conn = pool.get().await.unwrap();
Debug
Known issues
gotchaRequires async runtime (e.g., tokio) for pool operations
fix
Add tokio or async-std as a dependency and use an async runtime
affects: >=0.1.0
Upgrade
Version history
0.13.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
44 hits · last 30 days
node
38
OpenAI (training)
1
Resources
deadpool — cargo add deadpool · libregistry