2023-02-28 11:12:03 +00:00
|
|
|
pub mod client;
|
2023-03-05 21:04:28 +00:00
|
|
|
pub mod sasl;
|
2023-03-07 15:27:09 +00:00
|
|
|
pub mod stanzaerror;
|
2023-02-17 21:27:58 +00:00
|
|
|
pub mod stream;
|
2023-03-06 11:49:51 +00:00
|
|
|
pub mod tls;
|
2023-03-05 21:04:28 +00:00
|
|
|
|
|
|
|
// Implemented as a macro instead of a fn due to borrowck limitations
|
|
|
|
macro_rules! skip_text {
|
|
|
|
($reader: ident, $buf: ident) => {
|
|
|
|
loop {
|
|
|
|
use quick_xml::events::Event;
|
|
|
|
$buf.clear();
|
|
|
|
let res = $reader.read_event_into_async($buf).await?;
|
|
|
|
if let Event::Text(_) = res {
|
|
|
|
continue;
|
|
|
|
} else {
|
|
|
|
break res;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
pub(super) use skip_text;
|