29 releases (3 stable)

1.2.0 Feb 17, 2021
1.1.0 Nov 21, 2020
0.1.8 Oct 16, 2020
0.1.4 Jun 26, 2020

#340 in Database interfaces

Download history 46/week @ 2020-12-24 155/week @ 2020-12-31 122/week @ 2021-01-07 150/week @ 2021-01-14 54/week @ 2021-01-21 58/week @ 2021-01-28 208/week @ 2021-02-04 143/week @ 2021-02-11 135/week @ 2021-02-18 85/week @ 2021-02-25 42/week @ 2021-03-04 70/week @ 2021-03-11 17/week @ 2021-03-18 136/week @ 2021-03-25 45/week @ 2021-04-01 274/week @ 2021-04-08

563 downloads per month
Used in icee-rabbit-rs

MIT license

340KB
9K SLoC

Lapin integration with async-std

This crate integrates lapin with async-std by using async-std's executor inside of lapin for its internal operations and for consumer delegates.

use async_amqp::*;
use lapin::{Connection, ConnectionProperties, Result};

#[async_std::main]
async fn main() -> Result<()> {
    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_std()).await?; // Note the `with_async_std()` here
    let channel = conn.create_channel().await?;

    // Rest of your program
}

Dependencies

~7–10MB
~210K SLoC