src/attention.rs 🔗
@@ -12,6 +12,7 @@ use error::Error;
use ns;
+/// Structure representing an `<attention xmlns='urn:xmpp:attention:0'/>` element.
#[derive(Debug, Clone)]
pub struct Attention;
Emmanuel Gil Peyrot created
src/attention.rs | 1 +
src/chatstates.rs | 11 +++++++++++
src/eme.rs | 5 +++++
src/ping.rs | 1 +
4 files changed, 18 insertions(+)
@@ -12,6 +12,7 @@ use error::Error;
use ns;
+/// Structure representing an `<attention xmlns='urn:xmpp:attention:0'/>` element.
#[derive(Debug, Clone)]
pub struct Attention;
@@ -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 xmlns='http://jabber.org/protocol/chatstates'/>`
Active,
+
+ /// `<composing xmlns='http://jabber.org/protocol/chatstates'/>`
Composing,
+
+ /// `<gone xmlns='http://jabber.org/protocol/chatstates'/>`
Gone,
+
+ /// `<inactive xmlns='http://jabber.org/protocol/chatstates'/>`
Inactive,
+
+ /// `<paused xmlns='http://jabber.org/protocol/chatstates'/>`
Paused,
}
@@ -12,9 +12,14 @@ use error::Error;
use ns;
+/// Structure representing an `<encryption xmlns='urn:xmpp:eme:0'/>` 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<String>,
}
@@ -13,6 +13,7 @@ use error::Error;
use ns;
+/// Structure representing a `<ping xmlns='urn:xmpp:ping'/>` element.
#[derive(Debug, Clone)]
pub struct Ping;