[][src]Trait twitchchat::ToMessage

pub trait ToMessage {
    fn tags(&self) -> Option<TagType>;
fn prefix(&self) -> Option<&str>;
fn command(&self) -> Option<&str>;
fn args(&self) -> Option<ArgsType>;
fn data(&self) -> Option<&str>; }

Convert an IRC-like message type into something that the Twitch commands can be parsed from

Refer to this form when implementing this trait:

raw string form: @tags :prefix command args :data\r\n

Required methods

fn tags(&self) -> Option<TagType>

Get the tags portion of the IRC message

fn prefix(&self) -> Option<&str>

Get the prefix portion of the IRC message

fn command(&self) -> Option<&str>

Get the command portion of the IRC message

fn args(&self) -> Option<ArgsType>

Get the args portion of the IRC message

fn data(&self) -> Option<&str>

Get the data portion of the IRC message

Loading content...

Implementors

impl ToMessage for IrcMessage[src]

Loading content...