lib.rs

  1//! A crate parsing common XMPP elements into Rust structures.
  2//!
  3//! Each module implements the [`TryFrom<Element>`] trait, which takes a
  4//! minidom [`Element`] and returns a `Result` whose value is `Ok` if the
  5//! element parsed correctly, `Err(error::Error)` otherwise.
  6//!
  7//! The returned structure can be manipuled as any Rust structure, with each
  8//! field being public.  You can also create the same structure manually, with
  9//! some having `new()` and `with_*()` helper methods to create them.
 10//!
 11//! Once you are happy with your structure, you can serialise it back to an
 12//! [`Element`], using either `From` or `Into<Element>`, which give you what
 13//! you want to be sending on the wire.
 14//!
 15//! [`TryFrom<Element>`]: ../try_from/trait.TryFrom.html
 16//! [`Element`]: ../minidom/element/struct.Element.html
 17
 18// Copyright (c) 2017-2018 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
 19// Copyright (c) 2017 Maxime “pep” Buquet <pep+code@bouah.net>
 20//
 21// This Source Code Form is subject to the terms of the Mozilla Public
 22// License, v. 2.0. If a copy of the MPL was not distributed with this
 23// file, You can obtain one at http://mozilla.org/MPL/2.0/.
 24
 25#![deny(missing_docs)]
 26
 27pub use minidom::Element;
 28
 29/// XML namespace definitions used through XMPP.
 30pub mod ns;
 31
 32#[macro_use]
 33mod util;
 34
 35/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 36pub mod bind;
 37/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 38pub mod iq;
 39/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 40pub mod message;
 41/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 42pub mod presence;
 43/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 44pub mod sasl;
 45/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 46pub mod stanza_error;
 47/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 48pub mod stream;
 49
 50/// RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
 51pub mod roster;
 52
 53/// RFC 7395: An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket
 54pub mod websocket;
 55
 56/// XEP-0004: Data Forms
 57pub mod data_forms;
 58
 59/// XEP-0030: Service Discovery
 60pub mod disco;
 61
 62/// XEP-0045: Multi-User Chat
 63pub mod muc;
 64
 65/// XEP-0047: In-Band Bytestreams
 66pub mod ibb;
 67
 68/// XEP-0048: Bookmarks
 69pub mod bookmarks;
 70
 71/// XEP-0059: Result Set Management
 72pub mod rsm;
 73
 74/// XEP-0060: Publish-Subscribe
 75pub mod pubsub;
 76
 77/// XEP-0077: In-Band Registration
 78pub mod ibr;
 79
 80/// XEP-0082: XMPP Date and Time Profiles
 81pub mod date;
 82
 83/// XEP-0085: Chat State Notifications
 84pub mod chatstates;
 85
 86/// XEP-0092: Software Version
 87pub mod version;
 88
 89/// XEP-0107: User Mood
 90pub mod mood;
 91
 92/// XEP-0114: Jabber Component Protocol
 93pub mod component;
 94
 95/// XEP-0115: Entity Capabilities
 96pub mod caps;
 97
 98/// XEP-0166: Jingle
 99pub mod jingle;
100
101/// XEP-0172: User Nickname
102pub mod nick;
103
104/// XEP-0184: Message Delivery Receipts
105pub mod receipts;
106
107/// XEP-0191: Blocking Command
108pub mod blocking;
109
110/// XEP-0198: Stream Management
111pub mod sm;
112
113/// XEP-0199: XMPP Ping
114pub mod ping;
115
116/// XEP-0203: Delayed Delivery
117pub mod delay;
118
119/// XEP-0221: Data Forms Media Element
120pub mod media_element;
121
122/// XEP-0224: Attention
123pub mod attention;
124
125/// XEP-0234: Jingle File Transfer
126pub mod jingle_ft;
127
128/// XEP-0260: Jingle SOCKS5 Bytestreams Transport Method
129pub mod jingle_s5b;
130
131/// XEP-0261: Jingle In-Band Bytestreams Transport Method
132pub mod jingle_ibb;
133
134/// XEP-0297: Stanza Forwarding
135pub mod forwarding;
136
137/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
138pub mod hashes;
139
140/// XEP-0308: Last Message Correction
141pub mod message_correct;
142
143/// XEP-0313: Message Archive Management
144pub mod mam;
145
146/// XEP-0319: Last User Interaction in Presence
147pub mod idle;
148
149/// XEP-0353: Jingle Message Initiation
150pub mod jingle_message;
151
152/// XEP-0359: Unique and Stable Stanza IDs
153pub mod stanza_id;
154
155/// XEP-0380: Explicit Message Encryption
156pub mod eme;
157
158/// XEP-0390: Entity Capabilities 2.0
159pub mod ecaps2;