Enum tokio_xmpp::Event[][src]

pub enum Event {
    Online {
        bound_jid: Jid,
        resumed: bool,
    },
    Disconnected(Error),
    Stanza(Element),
}
Expand description

High-level event on the Stream implemented by Client and Component

Variants

Online

Fields

bound_jid: Jid

Server-set Jabber-Id for your session

This may turn out to be a different JID resource than expected, so use this one instead of the JID with which the connection was setup.

resumed: bool

Was this session resumed?

Not yet implemented for the Client

Stream is connected and initialized

Disconnected(Error)

Tuple Fields

0: Error

Stream end

Stanza(Element)

Tuple Fields

0: Element

Received stanza/nonza

Implementations

Online event?

Get the server-assigned JID for the Online event

Stanza event?

If this is a Stanza event, get its data

If this is a Stanza event, unwrap into its data

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.