28 releases (2 stable)

new 1.1.0 Nov 21, 2020
0.1.8 Oct 16, 2020
0.1.4 Jun 26, 2020

#414 in Database interfaces

Download history 6/week @ 2020-08-04 91/week @ 2020-08-11 36/week @ 2020-08-18 29/week @ 2020-08-25 54/week @ 2020-09-01 27/week @ 2020-09-08 36/week @ 2020-09-15 32/week @ 2020-09-22 73/week @ 2020-09-29 29/week @ 2020-10-06 65/week @ 2020-10-13 48/week @ 2020-10-20 100/week @ 2020-10-27 140/week @ 2020-11-03 21/week @ 2020-11-10 28/week @ 2020-11-17

225 downloads per month

MIT license

345KB
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–9.5MB
~205K SLoC