[−][src]Struct twitchchat::IrcMessage
A raw irc message @tags :prefix COMMAND args :data\r\n
Fields
raw: MaybeOwned<'a>
The raw string
Index of the tags
prefix: Option<PrefixIndex>
Index of the prefix
command: MaybeOwnedIndex
Index of the command
args: Option<MaybeOwnedIndex>
Index of the args
data: Option<MaybeOwnedIndex>
Index of the data
Implementations
impl<'a> IrcMessage<'a>
[src]
pub fn get_raw(&self) -> &str
[src]
Get the raw string
pub fn get_tags(&self) -> Option<&str>
[src]
Get the raw tags
pub fn get_prefix(&self) -> Option<&str>
[src]
Get the raw prefix
pub fn get_command(&self) -> &str
[src]
Get the raw command
pub fn get_args(&self) -> Option<&str>
[src]
Get the raw args
pub fn get_data(&self) -> Option<&str>
[src]
Get the raw data
pub fn into_inner(self) -> MaybeOwned<'a>
[src]
Consumes this type returning the raw MaybeOwned<'a>
pub fn nth_arg(&self, nth: usize) -> Option<&str>
[src]
Get the raw 'nth' argument
pub fn nth_arg_index(&self, nth: usize) -> Option<MaybeOwnedIndex>
[src]
Get the index of the 'nth' argumnet
impl<'a> IrcMessage<'a>
[src]
pub const IRC_READY: &'static str
[src]
An IRC Ready event -- 001
.
This is sent when you've connected.
pub const READY: &'static str
[src]
A Twitch Ready event -- 376
.
This is sent by Twitch with your user information.
pub const CAP: &'static str
[src]
A capability response -- CAP
.
This is sent to acknowledge whether the capability requested is valid and applied to your connections.
pub const CLEAR_CHAT: &'static str
[src]
An event when a user was 'purged' from a channel -- CLEARCHAT
.
pub const CLEAR_MSG: &'static str
[src]
An event when a users' message was removed. -- CLEARMSG
.
pub const GLOBAL_USER_STATE: &'static str
[src]
An event about your user state -- GLOBALUSERSTATE
.
This is sent when you've connected with TAGS
capability enabled.
pub const HOST_TARGET: &'static str
[src]
An event when a channel host event happens -- HOSTTARGET
.
pub const JOIN: &'static str
[src]
A Twitch event when a user joins a channel -- JOIN
.
pub const NOTICE: &'static str
[src]
A message from Twitch -- NOTICE
pub const PART: &'static str
[src]
A Twitch event when a user leaves a channel -- PART
pub const PING: &'static str
[src]
An event from Twitch which you must reply to -- PING
.
If you do not reply to this within a reasonable time, Twitch will disconnect you.
pub const PONG: &'static str
[src]
A response from Twitch when you manually ping the server -- PONG
.
pub const PRIVMSG: &'static str
[src]
The most common event, a user sends a message to a channel -- PRIVMSG
.
pub const RECONNECT: &'static str
[src]
Twitch requests that you disconnect and reconnect -- RECONNECT
.
pub const ROOM_STATE: &'static str
[src]
An event about the state of a room -- ROOM_STATE
.
pub const USER_NOTICE: &'static str
[src]
An event about the state of a user -- USERNOTICE
.
pub const USER_STATE: &'static str
[src]
An event about the state of a user -- USERSTATE
.
pub const WHISPER: &'static str
[src]
A message from a user directly to you -- WHISPER
.
Trait Implementations
impl<'a> Clone for IrcMessage<'a>
[src]
fn clone(&self) -> IrcMessage<'a>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'a> Debug for IrcMessage<'a>
[src]
impl<'de, 'a> Deserialize<'de> for IrcMessage<'a>
[src]
fn deserialize<D>(deserializer: D) -> Result<IrcMessage<'a>, D::Error> where
D: Deserializer<'de>,
[src]
D: Deserializer<'de>,
impl<'a> From<IrcMessage<'a>> for Commands<'a>
[src]
fn from(msg: IrcMessage<'a>) -> Self
[src]
impl<'a> FromIrcMessage<'a> for IrcMessage<'a>
[src]
type Error = Infallible
An error returned if this message could not be parsed.
fn from_irc(msg: IrcMessage<'a>) -> Result<Self, Self::Error>
[src]
fn into_inner(self) -> MaybeOwned<'a>
[src]
Consumes the message, returning the raw MaybeOwned<'_>
impl<'a> IntoOwned<'a> for IrcMessage<'a>
[src]
impl<'a> PartialEq<IrcMessage<'a>> for IrcMessage<'a>
[src]
fn eq(&self, other: &IrcMessage<'a>) -> bool
[src]
fn ne(&self, other: &IrcMessage<'a>) -> bool
[src]
impl<'a> Serialize for IrcMessage<'a>
[src]
impl<'a> StructuralPartialEq for IrcMessage<'a>
[src]
impl<'a> Validator for IrcMessage<'a>
[src]
fn parse_tags(&self) -> TagIndices
[src]
fn expect_command(&self, cmd: &str) -> Result<(), MessageError>
[src]
fn expect_nick(&self) -> Result<MaybeOwnedIndex, MessageError>
[src]
fn expect_arg(&self, nth: usize) -> Result<&str, MessageError>
[src]
fn expect_arg_index(&self, nth: usize) -> Result<MaybeOwnedIndex, MessageError>
[src]
fn expect_data(&self) -> Result<&str, MessageError>
[src]
fn expect_data_index(&self) -> Result<MaybeOwnedIndex, MessageError>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for IrcMessage<'a>
impl<'a> Send for IrcMessage<'a>
impl<'a> Sync for IrcMessage<'a>
impl<'a> Unpin for IrcMessage<'a>
impl<'a> UnwindSafe for IrcMessage<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<'a, T> IntoIrcMessage<'a> for T where
T: 'a + FromIrcMessage<'a>,
[src]
T: 'a + FromIrcMessage<'a>,
fn into_irc(Self) -> IrcMessage<'a>
[src]
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,