[][src]Crate xmpp_parsers

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 manipuled 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.

Structs

BareJid

A struct representing a bare Jabber ID.

FullJid

A struct representing a full Jabber ID.

Enums

Jid

An enum representing a Jabber ID. It can be either a FullJid or a BareJid.

JidParseError

An error that signifies that a Jid cannot be parsed from a string.

Structs

Element

A struct representing a DOM Element.

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

rsm

XEP-0059: Result Set Management

pubsub

XEP-0060: Publish-Subscribe

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

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

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

carbons

XEP-0280: Message Carbons

jingle_rtcp_fb

XEP-0293: Jingle RTP Feedback Negotiation

jingle_rtp_hdrext

XEP-0294: Jingle RTP Header Extensions Negociation

forwarding

XEP-0297: Stanza Forwarding

hashes

XEP-0300: Use of Cryptographic Hash Functions in XMPP

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

mix

XEP-0369: Mediated Information eXchange (MIX)

openpgp

XEP-0373: OpenPGP for XMPP

eme

XEP-0380: Explicit Message Encryption

ecaps2

XEP-0390: Entity Capabilities 2.0

bookmarks2

XEP-0402: Bookmarks 2 (This Time it's Serious)

occupant_id

XEP-0421: Anonymous unique occupant identifiers for MUCs

Enums

Error

Contains one of the potential errors triggered while parsing an Element into a specialised struct.