2024-03-20 18:59:15 +00:00
|
|
|
#![feature(coroutines, coroutine_trait, type_alias_impl_trait, impl_trait_in_assoc_type)]
|
2023-09-30 15:43:46 +00:00
|
|
|
|
2023-03-11 15:07:02 +00:00
|
|
|
pub mod bind;
|
2023-02-28 11:12:03 +00:00
|
|
|
pub mod client;
|
2023-03-27 21:45:44 +00:00
|
|
|
pub mod disco;
|
2023-03-25 09:59:14 +00:00
|
|
|
pub mod muc;
|
2024-03-20 18:59:15 +00:00
|
|
|
mod prelude;
|
2023-03-12 21:50:28 +00:00
|
|
|
pub mod roster;
|
2023-03-05 21:04:28 +00:00
|
|
|
pub mod sasl;
|
2023-03-12 13:15:13 +00:00
|
|
|
pub mod session;
|
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-09-30 15:43:46 +00:00
|
|
|
pub mod xml;
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2023-09-30 15:43:46 +00:00
|
|
|
pub(crate) use skip_text;
|