deadpool-amqprs

Crates.iodeadpool-amqprs
lib.rsdeadpool-amqprs
version
sourcesrc
created_at2023-02-12 06:56:08.055147
updated_at2025-01-10 03:14:06.273174
descriptionDead simple async pool for amqprs
homepage
repositoryhttps://github.com/Cryptex-github/deadpool-amqprs
max_upload_size
id782872
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Cryptex (Cryptex-github)

documentation

https://docs.rs/deadpool-amqprs

README

deadpool-amqprs

Deadpool for amqprs

Deadpool is a dead simple async pool for connections and objects of any type.

This crate implements a deadpool manager for amqprs.

Versions

  • v0.2.x - amqprs 0.9.x
  • v0.3.x - amqprs 0.10.x

Example

use deadpool_amqprs::Config;
use amqprs::{callbacks::{DefaultChannelCallback, DefaultConnectionCallback}, connection::OpenConnectionArguments};

#[tokio::main]
async fn main() {
    let config = Config::new_with_con_args(OpenConnectionArguments::default());
    let pool = config.create_pool();
    
    let con = pool.get().await.unwrap();
    con.register_callback(DefaultConnectionCallback).await.unwrap();

    let channel = con.open_channel().await.unwrap();
    channel.register_callback(DefaultChannelCallback).await.unwrap();

    // Do stuff with `channel`.
}
Commit count: 5

cargo fmt