forked from lavina/lavina
27 lines
587 B
Rust
27 lines
587 B
Rust
pub mod bind;
|
|
pub mod client;
|
|
pub mod roster;
|
|
pub mod sasl;
|
|
pub mod session;
|
|
pub mod stanzaerror;
|
|
pub mod stream;
|
|
pub mod tls;
|
|
|
|
// 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;
|