blob: 86da83d143b5751faad13b14a4d8dd6f79c08e95 (
plain) (
tree)
|
|
#![allow(unused_must_use)]
#![feature(let_chains)]
// TODO: logging (dropped errors)
pub mod client;
pub mod error;
pub mod jabber;
pub mod jid;
pub mod stanza;
// pub use client::encrypted::JabberClient;
pub use error::JabberError;
pub use jabber::Jabber;
pub use jid::JID;
pub type Result<T> = std::result::Result<T, JabberError>;
#[cfg(test)]
mod tests {
use std::str::FromStr;
use crate::Jabber;
use crate::JID;
#[tokio::test]
async fn login() {
Jabber::user(
JID::from_str("test@blos.sm/clown").unwrap(),
"slayed".to_owned(),
)
.unwrap()
.login()
.await
.unwrap()
.watch()
.await
.unwrap();
}
}
|