[][src]Struct twitchchat::decode::Message

pub struct Message<'t> {
    pub raw: Cow<'t, str>,
    pub tags: Tags<'t>,
    pub prefix: Option<Prefix<'t>>,
    pub command: Cow<'t, str>,
    pub args: Cow<'t, str>,
    pub data: Option<Cow<'t, str>>,
}

An IRC-like message

Fields

raw: Cow<'t, str>

The raw string

tags: Tags<'t>

Any targets found in the message

prefix: Option<Prefix<'t>>

The prefix of the message

command: Cow<'t, str>

The command of the message

args: Cow<'t, str>

Arguments to the command

data: Option<Cow<'t, str>>

Any data provided

Implementations

impl<'t> Message<'t>[src]

pub fn arg(&self, nth: usize) -> Option<&str>[src]

Get the 'nth' arg from this Message

Trait Implementations

impl<'t> AsOwned for Message<'t>[src]

type Owned = Message<'static>

The owned type

impl<'t> Clone for Message<'t>[src]

impl<'t> Debug for Message<'t>[src]

impl<'de, 't> Deserialize<'de> for Message<'t>[src]

impl<'a: 't, 't> Extract<'a, &'a Message<'t>> for &'a AllCommands<'t>[src]

impl<'t> From<Message<'t>> for AllCommands<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for AllCommands<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Cap<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Ping<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Pong<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Privmsg<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Raw<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Ready<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Reconnect[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for RoomState<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for UserNotice<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for UserState<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Whisper<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for ClearChat<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for ClearMsg<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for GlobalUserState<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for HostTarget<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for IrcReady<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Join<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Notice<'t>[src]

impl<'a: 't, 't> Parse<&'a Message<'t>> for Part<'t>[src]

impl<'t> PartialEq<Message<'t>> for Message<'t>[src]

impl<'t> Serialize for Message<'t>[src]

impl<'t> StructuralPartialEq for Message<'t>[src]

Auto Trait Implementations

impl<'t> RefUnwindSafe for Message<'t>

impl<'t> Send for Message<'t>

impl<'t> Sync for Message<'t>

impl<'t> Unpin for Message<'t>

impl<'t> UnwindSafe for Message<'t>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.