Skip to content

Commit 5e90cc6

Browse files
committed
cargo fmt
Signed-off-by: minghuaw <[email protected]>
1 parent 03725c7 commit 5e90cc6

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/binding/fe2o3_amqp/mod.rs

+18-18
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
//! This module integrated the [cloudevents-sdk](https://docs.rs/cloudevents-sdk) with
1+
//! This module integrated the [cloudevents-sdk](https://docs.rs/cloudevents-sdk) with
22
//! [fe2o3-amqp](https://docs.rs/fe2o3-amqp/) to easily send and receive CloudEvents
3-
//!
3+
//!
44
//! To send CloudEvents
5-
//!
5+
//!
66
//! ```rust
77
//! use fe2o3_amqp::{Connection, Sender, Session};
88
//! use cloudevents::{EventBuilderV10, binding::fe2o3_amqp::{EventMessage, AmqpMessage}};
9-
//!
9+
//!
1010
//! // You need a running AMQP 1.0 broker to try out this example.
1111
//! // With docker: docker run -it --rm -e ARTEMIS_USERNAME=guest -e ARTEMIS_PASSWORD=guest -p 5672:5672 vromero/activemq-artemis
12-
//!
12+
//!
1313
//! #[tokio::main]
1414
//! async fn main() {
1515
//! let mut connection =
@@ -38,16 +38,16 @@
3838
//! connection.close().await.unwrap();
3939
//! }
4040
//! ```
41-
//!
41+
//!
4242
//! To receiver CloudEvents
43-
//!
43+
//!
4444
//! ```rust
4545
//! use fe2o3_amqp::{Connection, Receiver, Session};
4646
//! use cloudevents::{EventBuilderV10, binding::fe2o3_amqp::{EventMessage, AmqpMessage}};
47-
//!
47+
//!
4848
//! // You need a running AMQP 1.0 broker to try out this example.
4949
//! // With docker: docker run -it --rm -e ARTEMIS_USERNAME=guest -e ARTEMIS_PASSWORD=guest -p 5672:5672 vromero/activemq-artemis
50-
//!
50+
//!
5151
//! #[tokio::main]
5252
//! async fn main() {
5353
//! let mut connection =
@@ -75,7 +75,7 @@ use chrono::{TimeZone, Utc};
7575
use fe2o3_amqp_types::messaging::{ApplicationProperties, Body, Message, Properties};
7676
use fe2o3_amqp_types::primitives::{Binary, SimpleValue, Symbol, Timestamp, Value};
7777

78-
use crate::event::{AttributeValue};
78+
use crate::event::AttributeValue;
7979
use crate::message::{BinaryDeserializer, Error, MessageAttributeValue, StructuredDeserializer};
8080
use crate::Event;
8181

@@ -106,25 +106,25 @@ pub type AmqpBody = Body<Value>;
106106

107107
/// This struct contains the necessary fields required for AMQP 1.0 binding.
108108
/// It provides conversion between [`Event`] and [`AmqpMessage`]
109-
///
109+
///
110110
/// # Examples
111-
///
111+
///
112112
/// ## [`Event`] -> [`AmqpMessage`] in binary content mode
113-
///
113+
///
114114
/// ```rust
115115
/// let event_message = EventMessage::from_binary_event(event).unwrap();
116116
/// let amqp_message = AmqpMessage:from(event_message);
117117
/// ```
118-
///
118+
///
119119
/// ## [`Event`] -> [`AmqpMessage`] in structured content mode
120-
///
120+
///
121121
/// ```rust
122122
/// let event_message = EventMessage::from_structured_event(event).unwrap();
123123
/// let amqp_message = AmqpMessage:from(event_message);
124124
/// ```
125-
///
125+
///
126126
/// ## [`AmqpMessage`] -> [`Event`]
127-
///
127+
///
128128
/// ```rust
129129
/// let event_message = EventMessage::from(amqp_message);
130130
/// let event = MessageDeserializer::into_event(event_message).unwrap();
@@ -314,4 +314,4 @@ impl<'a> TryFrom<(&'a str, SimpleValue)> for MessageAttributeValue {
314314
}
315315
}
316316
}
317-
}
317+
}

0 commit comments

Comments
 (0)