use bytes::Bytes;
use legion_protocol::{IrcMessage, Command as ProtocolCommand, IronError};
use std::collections::HashMap;
use thiserror::Error;
pub mod codec;
pub mod commands;
pub mod extensions;
pub use self::codec::IrcCodec;
pub use self::commands::Command;
pub use legion_protocol::{
Capability, CapabilitySet, CapabilityHandler,
constants, utils, Reply
};
pub use legion_protocol::sasl::{SaslAuth, SaslMechanism};
#[cfg(feature = "bleeding-edge")]
pub use legion_protocol::bleeding_edge;
pub type Message = IrcMessage;
pub type ProtocolError = IronError;
pub trait MessageExt {
fn to_bytes(&self) -> Bytes;
}
impl MessageExt for Message {
fn to_bytes(&self) -> Bytes {
Bytes::from(self.to_string())
}
}