Skip to main content

Crate zerodds_amqp_bridge

Crate zerodds_amqp_bridge 

Source
Expand description

Crate zerodds-amqp-bridge. Safety classification: STANDARD.

AMQP 1.0 (OASIS Standard) wire codec — pure Rust no_std + alloc, forbid(unsafe_code). Implements the full AMQP 1.0 type system, frame format, all 9 performatives and all 7 message sections, plus the DDS-AMQP-1.0 codec/codec-lite profile marker.

Spec references:

  • OASIS AMQP 1.0 Part 1 (Types), Part 2 (Transport), Part 3 (Messaging), Part 4 (Transactions), Part 5 (Security).
  • OMG DDS-AMQP 1.0 (formal/2024-08-01) §2.3 (Codec Profile), §2.4 (Codec-Lite Profile), §6.1 (Direct-Embed Topology), §7 (type-system mapping), §8 (message-section mapping).

§Layer position

Layer 5 — bridges. Substrate for:

§Public API (as of 1.0.0-rc.1)

Type system (types module):

Extended Types (extended_types module):

  • AmqpExtValue — full variant model (primitives + compound: list / map / array).
  • Encoder/decoder for ubyte / ushort / uint / byte / short / int / float / double / char / decimal32-64-128 / timestamp / uuid.

Frame format (frame module):

Performatives (performatives module):

Message sections (sections module):

  • MessageSection — Header / Delivery-Annotations / Message- Annotations / Properties / Application-Properties / AmqpValue / AmqpSequence / Data / Footer.
  • validate_section_sequence — order check per AMQP-1.0 Messaging §3.2.

Codec profile (codec_profile module):

  • CodecProfile::{Full, Lite}.
  • active_profile() (const) — Full by default, Lite with the codec-lite Cargo feature.
  • is_codec_lite_value / is_codec_lite_section — conformance checkers for DDS-AMQP-1.0 §2.4.

§Example

use zerodds_amqp_bridge::{decode_value, encode_long, AmqpValue};

let buf = encode_long(42);
let (v, consumed) = decode_value(&buf).expect("decode");
assert_eq!(v, AmqpValue::Long(42));
assert_eq!(consumed, buf.len());

Re-exports§

pub use extended_types::AmqpExtValue;
pub use extended_types::decode_byte;
pub use extended_types::decode_char;
pub use extended_types::decode_double;
pub use extended_types::decode_float;
pub use extended_types::decode_int;
pub use extended_types::decode_short;
pub use extended_types::decode_timestamp;
pub use extended_types::decode_ubyte;
pub use extended_types::decode_uint;
pub use extended_types::decode_ushort;
pub use extended_types::decode_uuid;
pub use extended_types::encode_byte;
pub use extended_types::encode_char;
pub use extended_types::encode_decimal32;
pub use extended_types::encode_decimal64;
pub use extended_types::encode_decimal128;
pub use extended_types::encode_double;
pub use extended_types::encode_float;
pub use extended_types::encode_int;
pub use extended_types::encode_short;
pub use extended_types::encode_timestamp;
pub use extended_types::encode_ubyte;
pub use extended_types::encode_uint;
pub use extended_types::encode_ushort;
pub use extended_types::encode_uuid;
pub use frame::FrameError;
pub use frame::FrameHeader;
pub use frame::FrameType;
pub use frame::decode_frame_header;
pub use frame::encode_frame_header;
pub use performatives::attach;
pub use performatives::attach_to;
pub use performatives::begin;
pub use performatives::close;
pub use performatives::data_payload_from_transfer;
pub use performatives::decode_performative;
pub use performatives::descriptor;
pub use performatives::detach;
pub use performatives::disposition;
pub use performatives::disposition_accept;
pub use performatives::encode_performative;
pub use performatives::end;
pub use performatives::flow;
pub use performatives::open;
pub use performatives::sasl_init;
pub use performatives::sasl_mechanisms_from_body;
pub use performatives::sasl_outcome_code;
pub use performatives::sasl_plain_response;
pub use performatives::sasl_response;
pub use performatives::transfer;
pub use performatives::transfer_message;
pub use sections::MessageSection;
pub use sections::validate_section_sequence;
pub use types::AmqpValue;
pub use types::FormatCode;
pub use types::TypeError;
pub use types::decode_value;
pub use types::encode_binary;
pub use types::encode_boolean;
pub use types::encode_long;
pub use types::encode_null;
pub use types::encode_string;
pub use types::encode_symbol;
pub use types::encode_ulong;

Modules§

codec_profile
Codec-profile conformance marker.
extended_types
AMQP 1.0 Extended Type Codecs — Spec §1.6 Tail + §1.6.22-§1.6.24.
frame
AMQP 1.0 Frame Format — Spec amqp-1.0-transport §2.3.
performatives
AMQP 1.0 Performatives — Spec amqp-1.0-transport §2.7.
sections
AMQP 1.0 Message Sections — Spec amqp-1.0-messaging §3.
types
AMQP 1.0 Type System — Spec amqp-1.0-types.