fe2o3_amqp_types/definitions/
mod.rs1use serde::{Deserialize, Serialize};
4use serde_bytes::ByteBuf;
5
6use serde_amqp::{
7 primitives::{OrderedMap, Symbol, Uint},
8 value::Value,
9};
10
11mod role;
13pub use role::Role;
14
15mod snd_settle_mode;
17pub use snd_settle_mode::SenderSettleMode;
18
19mod rcv_settle_mode;
21pub use rcv_settle_mode::ReceiverSettleMode;
22
23#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord, Deserialize, Serialize)]
25pub struct Handle(pub Uint);
26
27impl Default for Handle {
28 fn default() -> Self {
29 Handle(u32::MAX)
30 }
31}
32
33impl From<Uint> for Handle {
34 fn from(val: Uint) -> Self {
35 Self(val)
36 }
37}
38
39impl From<Handle> for Uint {
40 fn from(val: Handle) -> Self {
41 val.0
42 }
43}
44
45pub type Seconds = Uint;
47
48pub type Milliseconds = Uint;
50
51pub type DeliveryTag = ByteBuf;
54
55pub type DeliveryNumber = SequenceNo;
57
58pub type TransferNumber = SequenceNo;
60
61pub type SequenceNo = Uint;
63
64pub type MessageFormat = Uint;
66
67pub type IetfLanguageTag = Symbol;
69
70pub type Fields = OrderedMap<Symbol, Value>;
72
73mod error;
75pub use error::Error;
76
77mod error_cond;
78pub use error_cond::ErrorCondition;
79
80mod amqp_error;
82pub use amqp_error::AmqpError;
83
84mod conn_error;
86pub use conn_error::ConnectionError;
87
88mod session_error;
90pub use session_error::SessionError;
91
92mod link_error;
94pub use link_error::LinkError;
95
96mod constant_def;
98pub use constant_def::{MAJOR, MINOR, MIN_MAX_FRAME_SIZE, PORT, REVISION, SECURE_PORT};