pub enum IRCCommand {
Show 37 variants
NONE,
NAMES,
PRIVMSG,
NOTICE,
NICK,
USER,
QUIT,
MOTD,
LUSERS,
WHOIS,
TOPIC,
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
TOPIC
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
.
pub fn text_command(text: &str) -> IRCCommand
pub fn params_before_colon(&self) -> usize
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 Clone for IRCCommand
impl Clone for IRCCommand
Source§fn clone(&self) -> IRCCommand
fn clone(&self) -> IRCCommand
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for IRCCommand
impl Debug for IRCCommand
Source§impl PartialEq for IRCCommand
impl PartialEq for IRCCommand
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