lib.rs

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