#![feature(plugin, custom_derive, slice_patterns)] #![plugin(regex_macros)] #![cfg_attr(feature = "lints", plugin(clippy))] #![deny(warnings)] #![allow(unused_imports)] extern crate regex; #[macro_use] extern crate log; extern crate openssl; extern crate carboxyl; pub mod client; pub mod color; pub mod ident; pub mod callback; pub mod message; pub mod command; pub mod reply; pub mod event; use std::io; use std::result; use std::ops::{ Deref, DerefMut }; use openssl::ssl::error::SslError; pub use ident::Ident; pub use message::{ Message, MsgType }; pub use command::Command; pub use reply::Reply; pub use event::Event; pub use client::{ Client, OwnedClient, SharedClient }; #[derive(Debug)] pub enum IrscError { Io(io::Error), AlreadyConnected, NotConnected, NotFound, Ssl(SslError) } impl From for IrscError { fn from(e: SslError) -> IrscError { IrscError::Ssl(e) } } pub struct Result(result::Result); impl Deref for Result { type Target = result::Result; fn deref(&self) -> &result::Result { &self.0 } } impl DerefMut for Result { fn deref_mut(&mut self) -> &mut result::Result { &mut self.0 } } impl Result { fn inner(self) -> result::Result { self.0 } } pub const DEBUG: bool = cfg!(debug_assertions);