2021-05-15 00:23:04 -04:00
|
|
|
mod stanzafilter;
|
|
|
|
pub use stanzafilter::*;
|
|
|
|
|
2021-06-08 00:14:22 -04:00
|
|
|
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)
|
|
|
|
}
|
2021-06-08 00:14:22 -04:00
|
|
|
|
|
|
|
pub fn c2s(is_c2s: bool) -> &'static str {
|
|
|
|
if is_c2s {
|
|
|
|
"c2s"
|
|
|
|
} else {
|
|
|
|
"s2s"
|
|
|
|
}
|
|
|
|
}
|