metalmq_client/lib.rs
1//! AMQP 0.9 compatible async client based on Tokio.
2//!
3//! # Usage
4//!
5//! Add the following to your `Cargo.toml`
6//!
7//! ```toml
8//! [dependencies]
9//! metalmq-client = "0.2.2"
10//! ```
11//!
12//! And then from an async function you can connect to an AMQP server.
13//!
14//! ```
15//! use metalmq_client::Client;
16//!
17//! async fn send_message() {
18//! let mut client = Client::connect("localhost:5672", "guest", "guest").await.unwrap();
19//!
20//! client.channel_open(1).await.unwrap();
21//! client.close().await.unwrap();
22//! }
23//! ```
24mod dev;
25
26mod channel_api;
27pub use channel_api::{
28 Binding, Channel, ExchangeDeclareOpts, ExchangeType, HeaderMatch, IfEmpty, IfUnused, QueueDeclareOpts,
29};
30
31mod client_api;
32pub use client_api::{Client, EventSignal};
33
34mod consumer;
35pub use consumer::{ConsumerHandler, ConsumerSignal, Exclusive, NoAck, NoLocal};
36
37mod error;
38pub use error::ClientError;
39
40mod message;
41pub use message::{Content, DeliveredMessage, MessageProperties, PublishedMessage, ReturnedMessage};
42
43mod model;
44pub use model::ChannelNumber;
45
46mod processor;
47mod state;