forked from lavina/lavina
34 lines
753 B
Rust
34 lines
753 B
Rust
#![feature(coroutines, coroutine_trait, type_alias_impl_trait, impl_trait_in_assoc_type)]
|
|
|
|
pub mod bind;
|
|
pub mod client;
|
|
pub mod disco;
|
|
pub mod muc;
|
|
mod prelude;
|
|
pub mod roster;
|
|
pub mod sasl;
|
|
pub mod session;
|
|
pub mod stanzaerror;
|
|
pub mod stream;
|
|
pub mod streamerror;
|
|
pub mod tls;
|
|
pub mod xml;
|
|
|
|
// 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(crate) use skip_text;
|