11//! Implements AMQP 1.0 binding for CloudEvents
22
3- use std:: collections:: HashMap ;
43use std:: convert:: TryFrom ;
54
65use chrono:: { TimeZone , Utc } ;
76use fe2o3_amqp_types:: messaging:: { ApplicationProperties , Body , Message , Properties } ;
87use fe2o3_amqp_types:: primitives:: { Binary , SimpleValue , Symbol , Timestamp , Value } ;
98
10- use crate :: event:: { AttributeValue , ExtensionValue } ;
9+ use crate :: event:: { AttributeValue } ;
1110use crate :: message:: { BinaryDeserializer , Error , MessageAttributeValue , StructuredDeserializer } ;
1211use crate :: Event ;
1312
@@ -29,10 +28,13 @@ mod constants;
2928/// convenience, this type alias chose `Value` as the value of the generic parameter
3029pub type AmqpMessage = Message < Value > ;
3130
31+ /// Type alias for an AMQP 1.0 Body
32+ ///
33+ /// The generic parameter can be anything that implements `Serialize` and `Deserialize` but is of
34+ /// no importance because all CloudEvents are using the `Body::Data` as the body section type. For
35+ /// convenience, this type alias chose `Value` as the value of the generic parameter
3236pub type AmqpBody = Body < Value > ;
3337
34- pub type Extensions = HashMap < String , ExtensionValue > ;
35-
3638/// The receiver of the event can distinguish between the two modes by inspecting the content-type
3739/// message property field. If the value is prefixed with the CloudEvents media type
3840/// application/cloudevents, indicating the use of a known event format, the receiver uses
0 commit comments