forked from lavina/lavina
1
0
Fork 0
lavina/src/protos/xmpp/mod.rs

24 lines
540 B
Rust
Raw Normal View History

pub mod client;
pub mod sasl;
pub mod stream;
pub mod tls;
2023-03-07 13:56:31 +00:00
pub mod stanzaerror;
// 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;