diff --git a/src/attention.rs b/src/attention.rs index e394785..7d0b1f2 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 a5af910..4093edb 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 ba07f95..288431b 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 df8b193..c97fa50 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;