aboutsummaryrefslogblamecommitdiffstats
path: root/src/lib.rs
blob: 88b91a67a4712781f56e5b95139f4e44af27bf2e (plain) (tree)
1
2
3
4
5
6
7
8
9
                          
                          
 
                                 
                   

               
            
               
 
                               
                     

                       
 
                                                   
 



                                                                                               

            
                  

                                                                    

     
#![allow(unused_must_use)]
// #![feature(let_chains)]

// TODO: logging (dropped errors)
pub mod connection;
pub mod error;
pub mod jabber;
pub mod jid;
pub mod stanza;

pub use connection::Connection;
pub use error::Error;
pub use jabber::Jabber;
pub use jid::JID;

pub type Result<T> = std::result::Result<T, Error>;

pub async fn login<J: TryInto<JID>, P: AsRef<str>>(jid: J, password: P) -> Result<Connection> {
    todo!()
}

#[cfg(test)]
mod tests {
    #[tokio::test]
    async fn test_login() {
        crate::login("test@blos.sm/clown", "slayed").await.unwrap();
    }
}