Enum Code

Source
pub enum Code {
Show 183 variants Pass, Nick, User, Oper, Mode, Service, Quit, Squit, Join, Part, Topic, Names, List, Invite, Kick, Privmsg, Notice, Motd, Lusers, Version, Stats, Links, Time, Connect, Trace, Admin, Info, Servlist, Squery, Who, Whois, Whowas, Kill, Ping, Pong, Error, Away, Rehash, Die, Restart, Summon, Users, Wallops, Userhost, Ison, RplWelcome, RplYourhost, RplCreated, RplMyinfo, RplBounce, RplUserhost, RplIson, RplAway, RplUnaway, RplNowaway, RplWhoisuser, RplWhoisserver, RplWhoisoperator, RplWhoisidle, RplEndofwhois, RplWhoischannels, RplWhowasuser, RplEndofwhowas, RplListstart, RplList, RplListend, RplUniqopis, RplChannelmodeis, RplNotopic, RplTopic, RplInviting, RplSummoning, RplInvitelist, RplEndofinvitelist, RplExceptlist, RplEndofexecptlist, RplVersion, RplWhoreply, RplEndofwho, RplNamreply, RplEndofnames, RplLinks, RplEndoflinks, RplBanlist, RplEndofbanlist, RplInfo, RplEndofinfo, RplMotdstart, RplMotd, RplEndofmotd, RplYoureoper, RplRehashing, RplYoureservice, RplTime, RplUsersstart, RplUsers, RplEndofusers, RplNousers, RplTracelink, RplTraceconnecting, RplTracehandshake, RplTraceuknown, RplTraceoperator, RplTraceuser, RplTraceserver, RplTraceservice, RplTracenewtype, RplTraceclass, RplTracereconnect, RplTracelog, RplTraceend, RplStatslinkinfo, RplStatscommands, RplEndofstats, RplStatsuptime, RplStatsoline, RplUmodeis, RplServlist, RplServlistend, RplLuserclient, RplLuserop, RplLuserunknown, RplLuserchannels, RplLuserme, RplAdminme, RplAdminloc1, RplAdminloc2, RplAdminemail, RplTryagain, ErrNosuchnick, ErrNosuchserver, ErrNosuchchannel, ErrCannotsendtochan, ErrToomanychannels, ErrWasnosuchnick, ErrToomanytargets, ErrNosuchservice, ErrNoorigin, ErrNorecipient, ErrNotexttosend, ErrNotoplevel, ErrWildtoplevel, ErrBadmask, ErrUnknowncommand, ErrNomotd, ErrNoadmininfo, ErrFileerror, ErrNonicknamegiven, ErrErroneousnickname, ErrNicknameinuse, ErrNickcollision, ErrUnavailresource, ErrUsernotinchannel, ErrNotonchannel, ErrUseronchannel, ErrNologin, ErrSummondisabled, ErrUsersdisabled, ErrNotregistered, ErrNeedmoreparams, ErrAlreadyregistred, ErrNopermforhost, ErrPasswdmismatch, ErrYourebannedcreep, ErrYouwillbebanned, ErrKeyset, ErrChannelisfull, ErrUnknownmode, ErrInviteonlychan, ErrBannedfromchan, ErrBadchannelkey, ErrBadchanmask, ErrNochanmodes, ErrBanlistfull, ErrNoprivileges, ErrChanoprivsneeded, ErrCantkillserver, ErrRestricted, ErrUniqopprivsneeded, ErrNooperhost, ErrUmodeunknownflag, ErrUsersdontmatch, Unknown(String),
}
Expand description

Representation of IRC commands, replies and errors.

Variants§

§

Pass

PASS = “PASS”

§

Nick

NICK = “NICK”

§

User

USER = “USER”

§

Oper

OPER = “OPER”

§

Mode

MODE = “MODE”

§

Service

SERVICE = “SERVICE”

§

Quit

QUIT = “QUIT”

§

Squit

SQUIT = “SQUIT”

§

Join

JOIN = “JOIN”

§

Part

PART = “PART”

§

Topic

TOPIC = “TOPIC”

§

Names

NAMES = “NAMES”

§

List

LIST = “LIST”

§

Invite

INVITE = “INVITE”

§

Kick

KICK = “KICK”

§

Privmsg

PRIVMSG = “PRIVMSG”

§

Notice

NOTICE = “NOTICE”

§

Motd

MOTD = “MOTD”

§

Lusers

LUSERS = “LUSERS”

§

Version

VERSION = “VERSION”

§

Stats

STATS = “STATS”

LINKS = “LINKS”

§

Time

TIME = “TIME”

§

Connect

CONNECT = “CONNECT”

§

Trace

TRACE = “TRACE”

§

Admin

ADMIN = “ADMIN”

§

Info

INFO = “INFO”

§

Servlist

SERVLIST = “SERVLIST”

§

Squery

SQUERY = “SQUERY”

§

Who

WHO = “WHO”

§

Whois

WHOIS = “WHOIS”

§

Whowas

WHOWAS = “WHOWAS”

§

Kill

KILL = “KILL”

§

Ping

PING = “PING”

§

Pong

PONG = “PONG”

§

Error

ERROR = “ERROR”

§

Away

AWAY = “AWAY”

§

Rehash

REHASH = “REHASH”

§

Die

DIE = “DIE”

§

Restart

RESTART = “RESTART”

§

Summon

SUMMON = “SUMMON”

§

Users

USERS = “USERS”

§

Wallops

WALLOPS = “WALLOPS”

§

Userhost

USERHOST = “USERHOST”

§

Ison

ISON = “ISON”

§

RplWelcome

RPL_WELCOME = “001”

§

RplYourhost

RPL_YOURHOST = “002”

§

RplCreated

RPL_CREATED = “003”

§

RplMyinfo

RPL_MYINFO = “004”

§

RplBounce

RPL_BOUNCE = “005”

§

RplUserhost

RPL_USERHOST = “302”

§

RplIson

RPL_ISON = “303”

§

RplAway

RPL_AWAY = “301”

§

RplUnaway

RPL_UNAWAY = “305”

§

RplNowaway

RPL_NOWAWAY = “306”

§

RplWhoisuser

RPL_WHOISUSER = “311”

§

RplWhoisserver

RPL_WHOISSERVER = “312”

§

RplWhoisoperator

RPL_WHOISOPERATOR = “313”

§

RplWhoisidle

RPL_WHOISIDLE = “317”

§

RplEndofwhois

RPL_ENDOFWHOIS = “318”

§

RplWhoischannels

RPL_WHOISCHANNELS = “319”

§

RplWhowasuser

RPL_WHOWASUSER = “314”

§

RplEndofwhowas

RPL_ENDOFWHOWAS = “369”

§

RplListstart

RPL_LISTSTART = “321”

§

RplList

RPL_LIST = “322”

§

RplListend

RPL_LISTEND = “323”

§

RplUniqopis

RPL_UNIQOPIS = “325”

§

RplChannelmodeis

RPL_CHANNELMODEIS = “324”

§

RplNotopic

RPL_NOTOPIC = “331”

§

RplTopic

RPL_TOPIC = “332”

§

RplInviting

RPL_INVITING = “341”

§

RplSummoning

RPL_SUMMONING = “342”

§

RplInvitelist

RPL_INVITELIST = “346”

§

RplEndofinvitelist

RPL_ENDOFINVITELIST = “347”

§

RplExceptlist

RPL_EXCEPTLIST = “348”

§

RplEndofexecptlist

RPL_ENDOFEXECPTLIST = “349”

§

RplVersion

RPL_VERSION = “351”

§

RplWhoreply

RPL_WHOREPLY = “352”

§

RplEndofwho

RPL_ENDOFWHO = “315”

§

RplNamreply

RPL_NAMREPLY = “353”

§

RplEndofnames

RPL_ENDOFNAMES = “366”

RPL_LINKS = “364”

RPL_ENDOFLINKS = “365”

§

RplBanlist

RPL_BANLIST = “367”

§

RplEndofbanlist

RPL_ENDOFBANLIST = “368”

§

RplInfo

RPL_INFO = “371”

§

RplEndofinfo

RPL_ENDOFINFO = “374”

§

RplMotdstart

RPL_MOTDSTART = “375”

§

RplMotd

RPL_MOTD = “372”

§

RplEndofmotd

RPL_ENDOFMOTD = “376”

§

RplYoureoper

RPL_YOUREOPER = “381”

§

RplRehashing

RPL_REHASHING = “382”

§

RplYoureservice

RPL_YOURESERVICE = “383”

§

RplTime

RPL_TIME = “391”

§

RplUsersstart

RPL_USERSSTART = “392”

§

RplUsers

RPL_USERS = “393”

§

RplEndofusers

RPL_ENDOFUSERS = “394”

§

RplNousers

RPL_NOUSERS = “395”

RPL_TRACELINK = “200”

§

RplTraceconnecting

RPL_TRACECONNECTING = “201”

§

RplTracehandshake

RPL_TRACEHANDSHAKE = “202”

§

RplTraceuknown

RPL_TRACEUKNOWN = “203”

§

RplTraceoperator

RPL_TRACEOPERATOR = “204”

§

RplTraceuser

RPL_TRACEUSER = “205”

§

RplTraceserver

RPL_TRACESERVER = “206”

§

RplTraceservice

RPL_TRACESERVICE = “207”

§

RplTracenewtype

RPL_TRACENEWTYPE = “208”

§

RplTraceclass

RPL_TRACECLASS = “209”

§

RplTracereconnect

RPL_TRACERECONNECT = “210”

§

RplTracelog

RPL_TRACELOG = “261”

§

RplTraceend

RPL_TRACEEND = “262”

§

RplStatslinkinfo

RPL_STATSLINKINFO = “211”

§

RplStatscommands

RPL_STATSCOMMANDS = “212”

§

RplEndofstats

RPL_ENDOFSTATS = “219”

§

RplStatsuptime

RPL_STATSUPTIME = “242”

§

RplStatsoline

RPL_STATSOLINE = “243”

§

RplUmodeis

RPL_UMODEIS = “221”

§

RplServlist

RPL_SERVLIST = “234”

§

RplServlistend

RPL_SERVLISTEND = “235”

§

RplLuserclient

RPL_LUSERCLIENT = “251”

§

RplLuserop

RPL_LUSEROP = “252”

§

RplLuserunknown

RPL_LUSERUNKNOWN = “253”

§

RplLuserchannels

RPL_LUSERCHANNELS = “254”

§

RplLuserme

RPL_LUSERME = “255”

§

RplAdminme

RPL_ADMINME = “256”

§

RplAdminloc1

RPL_ADMINLOC1 = “257”

§

RplAdminloc2

RPL_ADMINLOC2 = “258”

§

RplAdminemail

RPL_ADMINEMAIL = “259”

§

RplTryagain

RPL_TRYAGAIN = “263”

§

ErrNosuchnick

ERR_NOSUCHNICK = “401”

§

ErrNosuchserver

ERR_NOSUCHSERVER = “402”

§

ErrNosuchchannel

ERR_NOSUCHCHANNEL = “403”

§

ErrCannotsendtochan

ERR_CANNOTSENDTOCHAN = “404”

§

ErrToomanychannels

ERR_TOOMANYCHANNELS = “405”

§

ErrWasnosuchnick

ERR_WASNOSUCHNICK = “406”

§

ErrToomanytargets

ERR_TOOMANYTARGETS = “407”

§

ErrNosuchservice

ERR_NOSUCHSERVICE = “408”

§

ErrNoorigin

ERR_NOORIGIN = “409”

§

ErrNorecipient

ERR_NORECIPIENT = “411”

§

ErrNotexttosend

ERR_NOTEXTTOSEND = “412”

§

ErrNotoplevel

ERR_NOTOPLEVEL = “413”

§

ErrWildtoplevel

ERR_WILDTOPLEVEL = “414”

§

ErrBadmask

ERR_BADMASK = “415”

§

ErrUnknowncommand

ERR_UNKNOWNCOMMAND = “421”

§

ErrNomotd

ERR_NOMOTD = “422”

§

ErrNoadmininfo

ERR_NOADMININFO = “423”

§

ErrFileerror

ERR_FILEERROR = “424”

§

ErrNonicknamegiven

ERR_NONICKNAMEGIVEN = “431”

§

ErrErroneousnickname

ERR_ERRONEOUSNICKNAME = “432”

§

ErrNicknameinuse

ERR_NICKNAMEINUSE = “433”

§

ErrNickcollision

ERR_NICKCOLLISION = “436”

§

ErrUnavailresource

ERR_UNAVAILRESOURCE = “437”

§

ErrUsernotinchannel

ERR_USERNOTINCHANNEL = “441”

§

ErrNotonchannel

ERR_NOTONCHANNEL = “442”

§

ErrUseronchannel

ERR_USERONCHANNEL = “443”

§

ErrNologin

ERR_NOLOGIN = “444”

§

ErrSummondisabled

ERR_SUMMONDISABLED = “445”

§

ErrUsersdisabled

ERR_USERSDISABLED = “446”

§

ErrNotregistered

ERR_NOTREGISTERED = “451”

§

ErrNeedmoreparams

ERR_NEEDMOREPARAMS = “461”

§

ErrAlreadyregistred

ERR_ALREADYREGISTRED = “462”

§

ErrNopermforhost

ERR_NOPERMFORHOST = “463”

§

ErrPasswdmismatch

ERR_PASSWDMISMATCH = “464”

§

ErrYourebannedcreep

ERR_YOUREBANNEDCREEP = “465”

§

ErrYouwillbebanned

ERR_YOUWILLBEBANNED = “466”

§

ErrKeyset

ERR_KEYSET = “467”

§

ErrChannelisfull

ERR_CHANNELISFULL = “471”

§

ErrUnknownmode

ERR_UNKNOWNMODE = “472”

§

ErrInviteonlychan

ERR_INVITEONLYCHAN = “473”

§

ErrBannedfromchan

ERR_BANNEDFROMCHAN = “474”

§

ErrBadchannelkey

ERR_BADCHANNELKEY = “475”

§

ErrBadchanmask

ERR_BADCHANMASK = “476”

§

ErrNochanmodes

ERR_NOCHANMODES = “477”

§

ErrBanlistfull

ERR_BANLISTFULL = “478”

§

ErrNoprivileges

ERR_NOPRIVILEGES = “481”

§

ErrChanoprivsneeded

ERR_CHANOPRIVSNEEDED = “482”

§

ErrCantkillserver

ERR_CANTKILLSERVER = “483”

§

ErrRestricted

ERR_RESTRICTED = “484”

§

ErrUniqopprivsneeded

ERR_UNIQOPPRIVSNEEDED = “485”

§

ErrNooperhost

ERR_NOOPERHOST = “491”

§

ErrUmodeunknownflag

ERR_UMODEUNKNOWNFLAG = “501”

§

ErrUsersdontmatch

ERR_USERSDONTMATCH = “502”

§

Unknown(String)

Codes that are unknown end up in here.

Implementations§

Source§

impl Code

Source

pub fn is_reply(&self) -> bool

Checks if the code is a reply.

Source

pub fn is_error(&self) -> bool

Check if the code is en error.

Trait Implementations§

Source§

impl Clone for Code

Source§

fn clone(&self) -> Code

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Code

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Display for Code

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl FromStr for Code

Source§

type Err = ()

The associated error which can be returned from parsing.
Source§

fn from_str(s: &str) -> Result<Code, ()>

Parses a string s to return a value of this type. Read more
Source§

impl PartialEq for Code

Source§

fn eq(&self, other: &Code) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Eq for Code

Source§

impl StructuralPartialEq for Code

Auto Trait Implementations§

§

impl Freeze for Code

§

impl RefUnwindSafe for Code

§

impl Send for Code

§

impl Sync for Code

§

impl Unpin for Code

§

impl UnwindSafe for Code

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.