Crate xmpp_parsers

Source
Expand description

A crate parsing common XMPP elements into Rust structures.

Each module implements the TryFrom<Element> trait, which takes a minidom Element and returns a Result whose value is Ok if the element parsed correctly, Err(error::Error) otherwise.

The returned structure can be manipulated as any Rust structure, with each field being public. You can also create the same structure manually, with some having new() and with_*() helper methods to create them.

Once you are happy with your structure, you can serialise it back to an Element, using either From or Into<Element>, which give you what you want to be sending on the wire.

Modules§

ns
XML namespace definitions used through XMPP.
bind
RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
iq
RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
message
RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
presence
RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
sasl
RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
stanza_error
RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
stream
RFC 6120: Extensible Messaging and Presence Protocol (XMPP): Core
roster
RFC 6121: Extensible Messaging and Presence Protocol (XMPP): Instant Messaging and Presence
websocket
RFC 7395: An Extensible Messaging and Presence Protocol (XMPP) Subprotocol for WebSocket
data_forms
XEP-0004: Data Forms
disco
XEP-0030: Service Discovery
muc
XEP-0045: Multi-User Chat
ibb
XEP-0047: In-Band Bytestreams
bookmarks
XEP-0048: Bookmarks
private
XEP-0049: Private XML storage
vcard
XEP-0054: vcard-temp This module implements vCard, for the purpose of vCard-based avatars as defined in XEP-0054.
rsm
XEP-0059: Result Set Management
pubsub
XEP-0060: Publish-Subscribe
oob
XEP-0066: OOB
xhtml
XEP-0071: XHTML-IM
ibr
XEP-0077: In-Band Registration
date
XEP-0082: XMPP Date and Time Profiles
avatar
XEP-0084: User Avatar
chatstates
XEP-0085: Chat State Notifications
version
XEP-0092: Software Version
mood
XEP-0107: User Mood
component
XEP-0114: Jabber Component Protocol
caps
XEP-0115: Entity Capabilities
tune
XEP-0118: User Tune
data_forms_validate
XEP-0122: Data Forms Validation
vcard_update
XEP-0153: vCard-Based Avatars This module implements vCard avatar updates defined in XEP-0153.
server_info
XEP-0157: Contact Addresses for XMPP Services
jingle
XEP-0166: Jingle
jingle_rtp
XEP-0167: Jingle RTP Sessions
nick
XEP-0172: User Nickname
jingle_ice_udp
XEP-0176: Jingle ICE-UDP Transport Method
jingle_raw_udp
XEP-0177: Jingle Raw UDP Transport Method
receipts
XEP-0184: Message Delivery Receipts
blocking
XEP-0191: Blocking Command
sm
XEP-0198: Stream Management
ping
XEP-0199: XMPP Ping
time
XEP-0202: Entity Time
delay
XEP-0203: Delayed Delivery
extdisco
XEP-0215: External Service Discovery
media_element
XEP-0221: Data Forms Media Element
attention
XEP-0224: Attention
bob
XEP-0231: Bits of Binary
jingle_ft
XEP-0234: Jingle File Transfer
cert_management
XEP-0257: Client Certificate Management for SASL EXTERNAL
jingle_s5b
XEP-0260: Jingle SOCKS5 Bytestreams Transport Method
jingle_ibb
XEP-0261: Jingle In-Band Bytestreams Transport Method
jingle_thumnails
XEP-0264: Jingle Content Thumbnails Jingle thumbnails (XEP-0264)
carbons
XEP-0280: Message Carbons
jingle_rtcp_fb
XEP-0293: Jingle RTP Feedback Negotiation
jingle_rtp_hdrext
XEP-0294: Jingle RTP Header Extensions Negotiation
forwarding
XEP-0297: Stanza Forwarding
hashes
XEP-0300: Use of Cryptographic Hash Functions in XMPP
rtt
XEP-0301: In-Band Real Time Text
message_correct
XEP-0308: Last Message Correction
mam
XEP-0313: Message Archive Management
idle
XEP-0319: Last User Interaction in Presence
jingle_dtls_srtp
XEP-0320: Use of DTLS-SRTP in Jingle Sessions
jid_prep
XEP-0328: JID Prep
jingle_grouping
XEP-0338: Jingle Grouping Framework
jingle_ssma
XEP-0339: Source-Specific Media Attributes in Jingle
csi
XEP-0352: Client State Indication
jingle_message
XEP-0353: Jingle Message Initiation
stanza_id
XEP-0359: Unique and Stable Stanza IDs
http_upload
XEP-0363: HTTP File Upload
mix
XEP-0369: Mediated Information eXchange (MIX)
openpgp
XEP-0373: OpenPGP for XMPP
eme
XEP-0380: Explicit Message Encryption
legacy_omemo
XEP-0380: OMEMO Encryption (experimental version 0.3.0)
bind2
XEP-0386: Bind 2
ecaps2
XEP-0390: Entity Capabilities 2.0
bookmarks2
XEP-0402: PEP Native Bookmarks
occupant_id
XEP-0421: Anonymous unique occupant identifiers for MUCs
mam_prefs
XEP-0441: Message Archive Management Preferences
reactions
XEP-0444: Message Reactions
fast
XEP-0484: Fast Authentication Streamlining Tokens

Re-exports§

pub use blake2;
pub use jid;
pub use minidom;
pub use sha1;
pub use sha2;
pub use sha3;

Enums§

Error
Error variants generated while parsing or serialising XML data.