xmlstream: support receiving stream errors

This commit is contained in:
Jonas Schäfer 2024-08-18 15:08:21 +02:00
parent 8c3c8c7c97
commit 2388f23b4e

View file

@ -6,7 +6,10 @@
use xso::{AsXml, FromXml};
use xmpp_parsers::{component, iq::Iq, message::Message, presence::Presence, sasl, starttls};
use xmpp_parsers::{
component, iq::Iq, message::Message, presence::Presence, sasl, starttls,
stream_error::ReceivedStreamError,
};
/// Any valid XMPP stream-level element.
#[derive(FromXml, AsXml, Debug)]
@ -35,4 +38,8 @@ pub enum XmppStreamElement {
/// Component protocol nonzas
#[xml(transparent)]
ComponentHandshake(component::Handshake),
/// Stream error received
#[xml(transparent)]
StreamError(ReceivedStreamError),
}