From a70ce99d914d98681ad0d7ec4183919f8cf5a372 Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 2 Aug 2018 19:24:09 +0200 Subject: [PATCH] receipts: Document this module. --- src/receipts.rs | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/receipts.rs b/src/receipts.rs index a557d00..9b287a6 100644 --- a/src/receipts.rs +++ b/src/receipts.rs @@ -4,12 +4,23 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at http://mozilla.org/MPL/2.0/. -generate_empty_element!(Request, "request", RECEIPTS); +#![deny(missing_docs)] -generate_element!(Received, "received", RECEIPTS, -attributes: [ - id: Option = "id" => optional, -]); +generate_empty_element!( + /// Requests that this message is acked by the final recipient once + /// received. + Request, "request", RECEIPTS +); + +generate_element!( + /// Notes that a previous message has correctly been received, it is + /// referenced by its 'id' attribute. + Received, "received", RECEIPTS, + attributes: [ + /// The 'id' attribute of the received message. + id: Option = "id" => optional, + ] +); #[cfg(test)] mod tests {