xmpp-proxy/src/lib.rs

17 lines
288 B
Rust
Raw Normal View History

2021-05-15 00:23:04 -04:00
mod stanzafilter;
pub use stanzafilter::*;
pub use log::{debug, error, info, trace};
2021-05-15 00:23:04 -04:00
pub fn to_str(buf: &[u8]) -> std::borrow::Cow<'_, str> {
String::from_utf8_lossy(buf)
}
pub fn c2s(is_c2s: bool) -> &'static str {
if is_c2s {
"c2s"
} else {
"s2s"
}
}