1
1
//! Implements AMQP 1.0 binding for CloudEvents
2
2
3
- use std:: collections:: HashMap ;
4
3
use std:: convert:: TryFrom ;
5
4
6
5
use chrono:: { TimeZone , Utc } ;
7
6
use fe2o3_amqp_types:: messaging:: { ApplicationProperties , Body , Message , Properties } ;
8
7
use fe2o3_amqp_types:: primitives:: { Binary , SimpleValue , Symbol , Timestamp , Value } ;
9
8
10
- use crate :: event:: { AttributeValue , ExtensionValue } ;
9
+ use crate :: event:: { AttributeValue } ;
11
10
use crate :: message:: { BinaryDeserializer , Error , MessageAttributeValue , StructuredDeserializer } ;
12
11
use crate :: Event ;
13
12
@@ -29,10 +28,13 @@ mod constants;
29
28
/// convenience, this type alias chose `Value` as the value of the generic parameter
30
29
pub type AmqpMessage = Message < Value > ;
31
30
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
32
36
pub type AmqpBody = Body < Value > ;
33
37
34
- pub type Extensions = HashMap < String , ExtensionValue > ;
35
-
36
38
/// The receiver of the event can distinguish between the two modes by inspecting the content-type
37
39
/// message property field. If the value is prefixed with the CloudEvents media type
38
40
/// application/cloudevents, indicating the use of a known event format, the receiver uses
0 commit comments