lib.rs

  1//! A crate parsing common XMPP elements into Rust structures.
  2//!
  3//! Each module implements the `TryFrom<&minidom::Element>` trait, which takes
  4//! a minidom `Element` reference and returns a `Result`.
  5//!
  6//! Parsed structs can then be manipulated manually, and must be serialised
  7//! back before being sent over the wire.
  8
  9// Copyright (c) 2017 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
 10//
 11// This Source Code Form is subject to the terms of the Mozilla Public
 12// License, v. 2.0. If a copy of the MPL was not distributed with this
 13// file, You can obtain one at http://mozilla.org/MPL/2.0/.
 14
 15#![feature(try_from)]
 16
 17extern crate minidom;
 18extern crate jid;
 19extern crate base64;
 20extern crate digest;
 21extern crate sha2;
 22extern crate sha3;
 23extern crate blake2;
 24
 25/// Error type returned by every parser on failure.
 26pub mod error;
 27/// XML namespace definitions used through XMPP.
 28pub mod ns;
 29
 30/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 31pub mod message;
 32/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 33pub mod presence;
 34/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 35pub mod iq;
 36/// RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
 37pub mod stanza_error;
 38
 39/// XEP-0004: Data Forms
 40pub mod data_forms;
 41
 42/// XEP-0030: Service Discovery
 43pub mod disco;
 44
 45/// XEP-0047: In-Band Bytestreams
 46pub mod ibb;
 47
 48/// XEP-0059: Result Set Management
 49pub mod rsm;
 50
 51/// XEP-0085: Chat State Notifications
 52pub mod chatstates;
 53
 54/// XEP-0166: Jingle
 55pub mod jingle;
 56
 57/// XEP-0184: Message Delivery Receipts
 58pub mod receipts;
 59
 60/// XEP-0199: XMPP Ping
 61pub mod ping;
 62
 63/// XEP-0203: Delayed Delivery
 64pub mod delay;
 65
 66/// XEP-0221: Data Forms Media Element
 67pub mod media_element;
 68
 69/// XEP-0224: Attention
 70pub mod attention;
 71
 72/// XEP-0234: Jingle File Transfer
 73pub mod jingle_ft;
 74
 75/// XEP-0260: Jingle SOCKS5 Bytestreams Transport Method
 76pub mod jingle_s5b;
 77
 78/// XEP-0261: Jingle In-Band Bytestreams Transport Method
 79pub mod jingle_ibb;
 80
 81/// XEP-0297: Stanza Forwarding
 82pub mod forwarding;
 83
 84/// XEP-0300: Use of Cryptographic Hash Functions in XMPP
 85pub mod hashes;
 86
 87/// XEP-0308: Last Message Correction
 88pub mod message_correct;
 89
 90/// XEP-0313: Message Archive Management
 91pub mod mam;
 92
 93/// XEP-0359: Unique and Stable Stanza IDs
 94pub mod stanza_id;
 95
 96/// XEP-0380: Explicit Message Encryption
 97pub mod eme;
 98
 99/// XEP-0390: Entity Capabilities 2.0
100pub mod ecaps2;