25 releases (2 stable)

new 1.1.0 Nov 21, 2020
0.5.1 Oct 16, 2020
0.3.1 Jul 23, 2020

#532 in Database interfaces

Download history 3/week @ 2020-08-05 112/week @ 2020-08-12 31/week @ 2020-08-19 45/week @ 2020-08-26 82/week @ 2020-09-02 3/week @ 2020-09-09 4/week @ 2020-09-16 14/week @ 2020-09-23 45/week @ 2020-09-30 4/week @ 2020-10-07 29/week @ 2020-10-14 31/week @ 2020-10-21 33/week @ 2020-10-28 39/week @ 2020-11-04 17/week @ 2020-11-11 22/week @ 2020-11-18

119 downloads per month

MIT license

345KB
9K SLoC

Lapin integration with smol

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

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

fn main() -> Result<()> {
    smol::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_smol()).await?; // Note the `with_smol()` here
        let channel = conn.create_channel().await?;

        // Rest of your program
    })
}

Dependencies

~8MB
~172K SLoC