[][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

Element

A struct representing a DOM Element.

Enums

Jid

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

Structs

BareJid

A struct representing a bare Jabber ID.

FullJid

A struct representing a full Jabber ID.

Enums

JidParseError

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

Traits

TryFrom

Simple and safe type conversions that may fail in a controlled way under some circumstances. It is the reciprocal of TryInto.

TryInto

An attempted conversion that consumes self, which may or may not be expensive.

Enums

Error

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

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

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

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

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

jingle_ft

XEP-0234: Jingle File Transfer

jingle_s5b

XEP-0260: Jingle SOCKS5 Bytestreams Transport Method

jingle_ibb

XEP-0261: Jingle In-Band Bytestreams Transport Method

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

jingle_message

XEP-0353: Jingle Message Initiation

stanza_id

XEP-0359: Unique and Stable Stanza IDs

eme

XEP-0380: Explicit Message Encryption

ecaps2

XEP-0390: Entity Capabilities 2.0