From 7612c53f9af82c7cba7548c21e9ce519c838a13f Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Thu, 20 Jul 2017 23:47:21 +0100 Subject: [PATCH] attention, chatstates, eme, ping: Add a docstring on the structs. --- src/attention.rs | 1 + src/chatstates.rs | 11 +++++++++++ src/eme.rs | 5 +++++ src/ping.rs | 1 + 4 files changed, 18 insertions(+) diff --git a/src/attention.rs b/src/attention.rs index e394785f..7d0b1f24 100644 --- a/src/attention.rs +++ b/src/attention.rs @@ -12,6 +12,7 @@ use error::Error; use ns; +/// Structure representing an `` element. #[derive(Debug, Clone)] pub struct Attention; diff --git a/src/chatstates.rs b/src/chatstates.rs index a5af910c..4093edbd 100644 --- a/src/chatstates.rs +++ b/src/chatstates.rs @@ -12,12 +12,23 @@ use error::Error; use ns; +/// Enum representing chatstate elements part of the +/// `http://jabber.org/protocol/chatstates` namespace. #[derive(Debug, Clone)] pub enum ChatState { + /// `` Active, + + /// `` Composing, + + /// `` Gone, + + /// `` Inactive, + + /// `` Paused, } diff --git a/src/eme.rs b/src/eme.rs index ba07f95c..288431b9 100644 --- a/src/eme.rs +++ b/src/eme.rs @@ -12,9 +12,14 @@ use error::Error; use ns; +/// Structure representing an `` element. #[derive(Debug, Clone)] pub struct ExplicitMessageEncryption { + /// Namespace of the encryption scheme used. pub namespace: String, + + /// User-friendly name for the encryption scheme, should be `None` for OTR, + /// legacy OpenPGP and OX. pub name: Option, } diff --git a/src/ping.rs b/src/ping.rs index df8b1939..c97fa502 100644 --- a/src/ping.rs +++ b/src/ping.rs @@ -13,6 +13,7 @@ use error::Error; use ns; +/// Structure representing a `` element. #[derive(Debug, Clone)] pub struct Ping;