Skip to main content

amq_protocol_types/
lib.rs

1#![deny(missing_docs, missing_debug_implementations, unsafe_code)]
2#![warn(unreachable_pub, unused_qualifications, unused_lifetimes)]
3#![warn(
4    clippy::must_use_candidate,
5    clippy::unwrap_in_result,
6    clippy::panic_in_result_fn
7)]
8
9//! AMQP 0-9-1 type system for Rust.
10//!
11//! Implements the full set of AMQP scalar types ([`AMQPValue`], [`AMQPType`]),
12//! compound types ([`FieldTable`], [`FieldArray`]), and wire-format
13//! serialisation/deserialisation via the [`generation`] and [`parsing`] modules.
14
15mod types;
16mod value;
17
18pub use crate::{types::*, value::*};
19
20/// Helpers to handle AMQP flags.
21pub mod flags;
22/// Generation utilities for the various AMQP types.
23pub mod generation;
24/// Parsing utilities for the various AMQP types.
25pub mod parsing;
26
27/// A Channel identifier
28pub type ChannelId = Identifier;
29/// The size of a chunk of a delivery's payload
30pub type ChunkSize = LongUInt;
31/// The number of consumers
32pub type ConsumerCount = LongUInt;
33/// A delivery tag
34pub type DeliveryTag = LongLongUInt;
35/// the size of an AMQP frame
36pub type FrameSize = LongUInt;
37/// The maximum heartbeat interval
38pub type Heartbeat = ShortUInt;
39/// An identifier (class id or method id)
40pub type Identifier = ShortUInt;
41/// The number of messages
42pub type MessageCount = LongUInt;
43/// The size of a delivery's payload
44pub type PayloadSize = LongLongUInt;
45/// A reply code (for closing channels and connections)
46pub type ReplyCode = ShortUInt;