tokio_xmpp: properly process <stream:error/> while waiting for features
Before this, a stream error would not be readable by user code, as the `recv_features()` function would not even attempt to parse it. This change allows application code to react to stream errors which are received before stream features are received. skip-changelog, because there's no release with the xmlstream module yet.
This commit is contained in:
parent
af7e47a791
commit
e438813fb2
6 changed files with 157 additions and 17 deletions
|
|
@ -39,6 +39,15 @@ impl IqHeader {
|
|||
}
|
||||
}
|
||||
|
||||
/// Payload of an IQ request stanza.
|
||||
pub enum IqRequestPayload {
|
||||
/// Payload of a type='get' stanza.
|
||||
Get(Element),
|
||||
|
||||
/// Payload of a type='set' stanza.
|
||||
Set(Element),
|
||||
}
|
||||
|
||||
/// Payload of an IQ stanza, by type.
|
||||
pub enum IqPayload {
|
||||
/// Payload of a type='get' stanza.
|
||||
|
|
|
|||
Loading…
Reference in a new issue