irc3/lib.rs
1//! # IRC3 for Rust
2//! The Rust IRC3 crate. Fast, async IRC for the humans.
3//! The IRC3 is designed to be an alternative to the [IRC
4//! crate](https://crates.io/crates/irc) that's low level
5//! and optimized.
6//!
7//! # DISCLAIMER
8//! As of `0.2.0` of the `irc3` crate, features documented
9//! may not be available.
10//!
11//! # Examples
12//! ```ignore
13//! extern crate irc3;
14//! extern crate tokio;
15//!
16//! use irc3::{Client, Message};
17//!
18//! #[tokio::main]
19//! async fn main() {
20//! let mut client = Client::new("localhost").await.unwrap();
21//!
22//! client.send(Message::new("NICK").with_param("frostu8")).await.unwrap();
23//! client.flush();
24//!
25//! // prints the server's welcome message
26//! client.next().await.unwrap().params().last();
27//! }
28//! ```
29
30extern crate futures;
31extern crate async_std;
32#[cfg(feature = "tls")]
33extern crate async_tls;
34
35pub mod client;
36pub mod proto;
37
38pub use proto::message::Message;
39pub use client::Client;
40
41#[cfg(test)]
42mod tests {
43 #[test]
44 fn it_works() {
45 assert_eq!(2 + 2, 4);
46 }
47}