[−][src]Enum tmi_parser::Message
Possible types of TMI messages.
Unrecognized messages are handled by the associated [parse] function.
Tags are always treated as Optional even on messages that require them. Actually, tags validation should be done by the user code.
Consider changing simple enum structs to enum tuples.
Variants
Represents a ping request message.
PING :<endpoint>
Represents a pong response message.
PONG :<endpoint>
Represents a capability request message.
CAP REQ :<capability>
Fields of CapReq
req: &'a strRepresents a capability acknowledgement message.
:<endpoint> CAP * ACK :<capability>
Fields of CapAck
req: &'a strRepresents a password authentication message.
PASS <password>
PASS oauth:<token> (using Twitch OAuth tokens)
Fields of Pass
pass: &'a strRepresents a nickname authentication message.
NICK <user>
Fields of Nick
nick: &'a strRepresents a join command message.
JOIN #<channel>
Fields of Join
chan: &'a strRepresents a part command message.
PART #<channel>
Fields of Part
chan: &'a strRepresents a privmsg command message.
[@<tags>] PRIVMSG #<channel> :<message>
Represents a clearchat command message.
[@<tags>] :<endpoint> CLEARCHAT #<channel> [:<user>]
Represents a clearmsg command message.
[@<tags>] :<endpoint> CLEARMSG #<channel> [:<message>]
Represents a hosttarget start message.
:<endpoint> HOSTTARGET #<host> :<channel> [<viewers>]
Represents a hosttarget end message.
:<endpoint> HOSTTARGET #<host> :- [<viewers>]
Represents a notice message.
[@<tags>] :<endpoint> NOTICE #<channel> :<message>
Represents a reconnect request message.
RECONNECT
Represents a roomstate message.
[@<tags>] :<endpoint> ROOMSTATE #<channel>
Fields of Roomstate
chan: &'a strRepresents a usernotice message.
[@<tags>] :<endpoint> USERNOTICE #<channel> :<message>
Represents a userstate message.
[@<tags>] :<endpoint> USERSTATE #<channel>
Fields of Userstate
chan: &'a strRepresents a global userstate message.
[@<tags>] :<endpoint> GLOBALUSERSTATE
Fields of GlobalUserstate
Implementations
impl<'a> Message<'a>[src]
pub fn parse(msg: &'a str) -> Result<Message<'_>>[src]
Parses a [& str] slice and returns a Message if successful, otherwise an [io::Error].
Examples
let s = ":tmi.twitch.tv CLEARCHAT #dallas :ronni"; let msg = tmi_parser::Message::parse(s);
Trait Implementations
impl<'a> Debug for Message<'a>[src]
impl<'a> PartialEq<Message<'a>> for Message<'a>[src]
pub fn eq(&self, other: &Message<'a>) -> bool[src]
pub fn ne(&self, other: &Message<'a>) -> bool[src]
impl<'a> StructuralPartialEq for Message<'a>[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for Message<'a>[src]
impl<'a> Send for Message<'a>[src]
impl<'a> Sync for Message<'a>[src]
impl<'a> Unpin for Message<'a>[src]
impl<'a> UnwindSafe for Message<'a>[src]
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,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
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.
pub 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>,