Enum irc_command_micro::command::IRCCommand
source · pub enum IRCCommand {
Show 36 variants
NONE,
NAMES,
PRIVMSG,
NOTICE,
NICK,
USER,
QUIT,
MOTD,
LUSERS,
WHOIS,
RPL_WELCOME,
RPL_YOURHOST,
RPL_CREATED,
RPL_MYINFO,
RPL_NAMREPLY,
RPL_ENDOFNAMES,
RPL_LUSERCLIENT,
RPL_LUSEROP,
RPL_LUSERUNKNOWN,
RPL_LUSERCHANNELS,
RPL_LUSERME,
RPL_WHOISUSER,
RPL_WHOISSERVER,
RPL_ENDOFWHOIS,
PING,
PONG,
ERR_NONICKNAMEGIVEN,
ERR_NICKNAMEINUSE,
ERR_ALREADYREGISTRED,
ERR_NEEDMOREPARAMS,
ERR_NOTREGISTERED,
ERR_UNKNOWNCOMMAND,
ERR_NORECIPIENT,
ERR_NOTEXTTOSEND,
ERR_NOSUCHNICK,
ERR_NOMOTD,
}
Variants§
NONE
NAMES
PRIVMSG
NOTICE
NICK
USER
QUIT
MOTD
LUSERS
WHOIS
RPL_WELCOME
RPL_YOURHOST
RPL_CREATED
RPL_MYINFO
RPL_NAMREPLY
RPL_ENDOFNAMES
RPL_LUSERCLIENT
RPL_LUSEROP
RPL_LUSERUNKNOWN
RPL_LUSERCHANNELS
RPL_LUSERME
RPL_WHOISUSER
RPL_WHOISSERVER
RPL_ENDOFWHOIS
PING
PONG
ERR_NONICKNAMEGIVEN
ERR_NICKNAMEINUSE
ERR_ALREADYREGISTRED
ERR_NEEDMOREPARAMS
ERR_NOTREGISTERED
ERR_UNKNOWNCOMMAND
ERR_NORECIPIENT
ERR_NOTEXTTOSEND
ERR_NOSUCHNICK
ERR_NOMOTD
Implementations§
source§impl IRCCommand
impl IRCCommand
sourcepub fn command_text(&self) -> &str
pub fn command_text(&self) -> &str
Returns a reference to the command text of this IRCCommand
.
sourcepub fn parse_params(
&self,
raw_input: Vec<Vec<u8>>,
) -> Result<Vec<Vec<u8>>, MessageError>
pub fn parse_params( &self, raw_input: Vec<Vec<u8>>, ) -> Result<Vec<Vec<u8>>, MessageError>
From a vector of u8 vectors, each entry representing the space (32) seperated values following the IRCCommand, will return a similar list of parameters. If a : (58) is encountered at the start of an entry all remaining values are concatenated with a space (32)
§Errors
This function will return an error if .
Trait Implementations§
source§impl Debug for IRCCommand
impl Debug for IRCCommand
source§impl PartialEq for IRCCommand
impl PartialEq for IRCCommand
source§fn eq(&self, other: &IRCCommand) -> bool
fn eq(&self, other: &IRCCommand) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for IRCCommand
Auto Trait Implementations§
impl Freeze for IRCCommand
impl RefUnwindSafe for IRCCommand
impl Send for IRCCommand
impl Sync for IRCCommand
impl Unpin for IRCCommand
impl UnwindSafe for IRCCommand
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more