#![allow(non_camel_case_types)]
pub mod cap;
pub mod cmd;
pub mod isupport;
mod types;
pub use types::*;
use crate::string::{Arg, Bytes, Nick};
#[allow(clippy::declare_interior_mutable_const)]
pub const STAR: Nick<'static> = unsafe { Nick::from_unchecked(Bytes::from_str("*")) };
#[allow(clippy::declare_interior_mutable_const)]
pub const PLUS: Arg<'static> = unsafe { Arg::from_unchecked(Bytes::from_str("+")) };
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum ClientMsgKind {}
impl NameClass for ClientMsgKind {
type Raw<'a> = crate::string::Cmd<'a>;
type Union<'a> = crate::ircmsg::ClientMsg<'a>;
fn get_tag<'a, 'b>(outer: &'a Self::Union<'b>) -> &'a Self::Raw<'b> {
&outer.cmd
}
fn get_tag_mut<'a, 'b>(outer: &'a mut Self::Union<'b>) -> &'a mut Self::Raw<'b> {
&mut outer.cmd
}
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum ServerMsgKind {}
impl NameClass for ServerMsgKind {
type Raw<'a> = crate::ircmsg::ServerMsgKindRaw<'a>;
type Union<'a> = crate::ircmsg::ServerMsg<'a>;
fn get_tag<'a, 'b>(outer: &'a Self::Union<'b>) -> &'a Self::Raw<'b> {
&outer.kind
}
fn get_tag_mut<'a, 'b>(outer: &'a mut Self::Union<'b>) -> &'a mut Self::Raw<'b> {
&mut outer.kind
}
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum ISupport {}
impl NameClass for ISupport {
type Raw<'a> = crate::string::Key<'a>;
type Union<'a> = (Self::Raw<'a>, crate::string::Word<'a>);
fn get_tag<'a, 'b>(outer: &'a Self::Union<'b>) -> &'a Self::Raw<'b> {
&outer.0
}
fn get_tag_mut<'a, 'b>(outer: &'a mut Self::Union<'b>) -> &'a mut Self::Raw<'b> {
&mut outer.0
}
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum MsgTag {}
impl NameClass for MsgTag {
type Raw<'a> = crate::string::Key<'a>;
type Union<'a> = (Self::Raw<'a>, crate::string::NoNul<'a>);
fn get_tag<'a, 'b>(outer: &'a Self::Union<'b>) -> &'a Self::Raw<'b> {
&outer.0
}
fn get_tag_mut<'a, 'b>(outer: &'a mut Self::Union<'b>) -> &'a mut Self::Raw<'b> {
&mut outer.0
}
}
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum Cap {}
impl NameClass for Cap {
type Raw<'a> = crate::string::Key<'a>;
type Union<'a> = (Self::Raw<'a>, crate::string::Word<'a>);
fn get_tag<'a, 'b>(outer: &'a Self::Union<'b>) -> &'a Self::Raw<'b> {
&outer.0
}
fn get_tag_mut<'a, 'b>(outer: &'a mut Self::Union<'b>) -> &'a mut Self::Raw<'b> {
&mut outer.0
}
}