[][src]Struct twitchchat::messages::Privmsg

pub struct Privmsg<'t> {
    pub name: Cow<'t, str>,
    pub channel: Cow<'t, str>,
    pub data: Cow<'t, str>,
    pub tags: Tags<'t>,
}

Message sent by a user

Fields

name: Cow<'t, str>

User who sent this messages

channel: Cow<'t, str>

Channel this message was sent on

data: Cow<'t, str>

Data that the user provided

tags: Tags<'t>

Tags attached to the message

Methods

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

pub fn badge_info(&'t self) -> Vec<BadgeInfo<'t>>[src]

Metadata related to the chat badges

Currently used only for subscriber, to indicate the exact number of months the user has been a subscriber

pub fn badges(&'t self) -> Vec<Badge<'t>>[src]

Badges attached to this message

pub fn bits(&self) -> Option<u64>[src]

How many bits were attached to this message

pub fn color(&self) -> Option<Color>[src]

The color of the user who sent this message, if set

pub fn display_name(&'t self) -> Option<&'t Cow<'t, str>>[src]

display_name

pub fn emotes(&self) -> Vec<Emotes>[src]

Emotes attached to this message

pub fn is_moderator(&self) -> bool[src]

Whether the user sending this message was a moderator

pub fn room_id(&self) -> Option<u64>[src]

The id of the room this message was sent to

pub fn tmi_sent_ts(&self) -> Option<u64>[src]

The timestamp of when this message was received by Twitch

pub fn user_id(&self) -> Option<u64>[src]

The id of the user who sent this message

Trait Implementations

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

type Owned = Privmsg<'static>

The owned type

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

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'t> RefUnwindSafe for Privmsg<'t>

impl<'t> Send for Privmsg<'t>

impl<'t> Sync for Privmsg<'t>

impl<'t> Unpin for Privmsg<'t>

impl<'t> UnwindSafe for Privmsg<'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: 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.