Deadpool is a dead simple async pool for connections and objects of any type.
This crate implements a deadpool
manager for lapin
.
| Feature | Description | Extra dependencies | Default |
| ------- | ----------- | ------------------ | ------- |
| config
| Enable support for config crate | config
, serde/derive
| yes |
| rt_tokio_1
| Enable support for tokio crate | deadpool/rt_tokio_1
| yes |
| rt_async-std_1
| Enable support for async-std crate | deadpool/rt_async-std_1
| no |
tokio-amqp
crate```rust,ignore use std::sync::Arc;
use deadpoollapin::{Config, Manager, Pool }; use deadpoollapin::lapin::{ options::BasicPublishOptions, BasicProperties }; use tokio::runtime::Runtime; use tokio_amqp::LapinTokioExt;
async fn main() -> Result<(), Box
config
, dotenv
and tokio-amqp
crate```rust use std::sync::Arc;
use deadpool_lapin::lapin::{ options::BasicPublishOptions, BasicProperties }; use dotenv::dotenv; use serde::Deserialize;
struct Config { #[serde(default)] amqp: deadpool_lapin::Config }
impl Config {
pub fn fromenv() -> Result
async fn main() -> Result<(), Box
Licensed under either of
at your option.