17 个版本 (6 个稳定)

2.0.0 2022年2月2日
1.3.0 2022年1月30日
1.2.0 2021年2月17日
1.1.0 2020年11月21日
0.2.1 2020年7月24日

#59#rabbitmq

Download history • Rust 包仓库 427/week @ 2024-03-13 • Rust 包仓库 317/week @ 2024-03-20 • Rust 包仓库 175/week @ 2024-03-27 • Rust 包仓库 525/week @ 2024-04-03 • Rust 包仓库 346/week @ 2024-04-10 • Rust 包仓库 417/week @ 2024-04-17 • Rust 包仓库 437/week @ 2024-04-24 • Rust 包仓库 547/week @ 2024-05-01 • Rust 包仓库 471/week @ 2024-05-08 • Rust 包仓库 657/week @ 2024-05-15 • Rust 包仓库 223/week @ 2024-05-22 • Rust 包仓库 498/week @ 2024-05-29 • Rust 包仓库 593/week @ 2024-06-05 • Rust 包仓库 451/week @ 2024-06-12 • Rust 包仓库 308/week @ 2024-06-19 • Rust 包仓库 311/week @ 2024-06-26 • Rust 包仓库

1,781 每月下载
用于 7 个crate (3 直接)

MIT 许可证

340KB
9K SLoC

lapin与async-io集成

此crate通过在lapin内部使用async-io的reactor来集成lapin与async-io。

use async_lapin::*;
use lapin::{executor::Executor, Connection, ConnectionProperties, Result};
use std::{future::Future, pin::Pin};

fn main() -> Result<()> {
    async_global_executor::block_on(async {
        let addr = std::env::var("AMQP_ADDR").unwrap_or_else(|_| "amqp://127.0.0.1:5672/%2f".into());
        let conn = Connection::connect(
            &addr,
            ConnectionProperties::default().with_async_io(SmolExecutor)
        )
        .await?; // Note the `with_async_io()` here
        let channel = conn.create_channel().await?;

        // Rest of your program
    })
}

依赖项

~8–18MB
~276K SLoC