zerodds_amqp_0_9_1/lib.rs
1// SPDX-License-Identifier: Apache-2.0
2// Copyright 2026 ZeroDDS Contributors
3
4//! # `zerodds-amqp-0-9-1`
5//!
6//! Crate `zerodds-amqp-0-9-1`. Safety classification: **STANDARD**.
7//!
8//! AMQP **0.9.1** — the classic, broker-centric class/method protocol that
9//! RabbitMQ speaks by default and that is still >80% of deployed AMQP. This is
10//! an **entirely separate protocol** from AMQP 1.0 (`zerodds-amqp-bridge`):
11//! different framing, a different type system (field tables, not described
12//! types), and a broker model baked into the wire (exchanges/queues/bindings,
13//! connection/channel/basic methods).
14//!
15//! Layers:
16//! - [`types`] — big-endian wire types + typed field tables (§4.2.5).
17//! - [`frame`] — the `type/channel/size/payload/0xCE` frame format (§4.2.2).
18//! - [`method`] — class/method framing + content properties: connection,
19//! channel (open/flow/close), exchange (declare/delete), queue
20//! (declare/bind/unbind/purge/delete), basic (publish/get/consume/ack/
21//! reject/nack/qos), confirm (publisher confirms) and tx (transactions).
22//! - [`client`] — a synchronous broker client (`std`).
23//!
24//! `no_std + alloc`; the `client` needs `std` (TCP).
25
26#![cfg_attr(not(feature = "std"), no_std)]
27#![forbid(unsafe_code)]
28
29extern crate alloc;
30
31pub mod frame;
32pub mod method;
33pub mod types;
34
35#[cfg(feature = "std")]
36pub mod client;
37
38pub use frame::{Frame, FrameType, PROTOCOL_HEADER};
39pub use method::ContentProperties;
40pub use types::{FieldValue, Reader, WireError, Writer, pack_bits};