Expand description
Crate zerodds-amqp-bridge. Safety classification: STANDARD.
AMQP 1.0 (OASIS Standard) Wire-Codec — pure-Rust no_std + alloc,
forbid(unsafe_code). Implementiert das vollstaendige AMQP-1.0
Type-System, Frame-Format, alle 9 Performatives und alle 7
Message-Sections, plus den DDS-AMQP-1.0 Codec-/Codec-Lite-Profile-
Marker.
Spec-Referenzen:
- 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).
§Schichten-Position
Layer 5 — Bridges. Substrat fuer:
zerodds-amqp-endpoint— DDS-AMQP-1.0 Endpoint-Layer mit Direct-Embed-Topology.
§Public API (Stand 1.0.0-rc.1)
Type-System (types-Modul):
AmqpValue/FormatCode/TypeError.encode_null/encode_boolean/encode_long/encode_ulong/encode_string/encode_symbol/encode_binary— Primitiv-Encoder.decode_value— Variant-Decoder ueber alle Format-Codes.
Extended Types (extended_types-Modul):
AmqpExtValue— Vollstaendiges Variant-Modell (Primitive + Compound: list / map / array).- Encoder/Decoder fuer ubyte / ushort / uint / byte / short / int / float / double / char / decimal32-64-128 / timestamp / uuid.
Frame-Format (frame-Modul):
FrameHeader/FrameType/FrameError.encode_frame_header/decode_frame_header— 4-Byte SIZE BE + DOFF + TYPE + CHANNEL BE + Extended-Header.
Performatives (performatives-Modul):
open/begin/attach/flow/transfer/disposition/detach/end/close— die 9 Transport-Performatives.encode_performative/decode_performative.
Message-Sections (sections-Modul):
MessageSection— Header / Delivery-Annotations / Message- Annotations / Properties / Application-Properties / AmqpValue / AmqpSequence / Data / Footer.validate_section_sequence— Reihenfolge-Pruefung gemaess AMQP-1.0 Messaging §3.2.
Codec-Profile (codec_profile-Modul):
CodecProfile::{Full, Lite}.active_profile()(const) —Fullper Default,Litemit Cargo-Featurecodec-lite.is_codec_lite_value/is_codec_lite_section— Conformance- Pruefer fuer DDS-AMQP-1.0 §2.4.
§Beispiel
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::begin;pub use performatives::close;pub use performatives::decode_performative;pub use performatives::detach;pub use performatives::disposition;pub use performatives::encode_performative;pub use performatives::end;pub use performatives::flow;pub use performatives::open;pub use performatives::transfer;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.