[][src]Struct twitch_irc::message::UserStateMessage

pub struct UserStateMessage {
    pub channel_login: String,
    pub user_name: String,
    pub badge_info: Vec<Badge>,
    pub badges: Vec<Badge>,
    pub emote_sets: HashSet<u64>,
    pub name_color: Option<RGBColor>,
    pub source: IRCMessage,
}

Sent when you join a channel or when you successfully sent a PRIVMSG message to a channel.

This specifies details about the logged in user in a given channel.

This message is similar to GLOBALUSERSTATE, but carries the context of a channel_login (and therefore possibly different badges and badge_info) and omits the user_id.

Fields

channel_login: String

Login name of the channel this USERSTATE message specifies the logged in user's state in.

user_name: String

(Display) name of the logged in user.

badge_info: Vec<Badge>

Metadata related to the chat badges in the badges tag.

Currently this is used only for subscriber, to indicate the exact number of months the user has been a subscriber. This number is finer grained than the version number in badges. For example, a user who has been a subscriber for 45 months would have a badge_info value of 45 but might have a badges version number for only 3 years.

badges: Vec<Badge>

List of badges the logged in user has in this channel.

emote_sets: HashSet<u64>

List of emote set IDs the logged in user has available. This always contains at least 0.

name_color: Option<RGBColor>

What name color the logged in user has chosen. The same color is used in all channels.

source: IRCMessage

The message that this UserStateMessage was parsed from.

Trait Implementations

impl Clone for UserStateMessage[src]

impl Debug for UserStateMessage[src]

impl From<UserStateMessage> for IRCMessage[src]

impl PartialEq<UserStateMessage> for UserStateMessage[src]

impl StructuralPartialEq for UserStateMessage[src]

impl TryFrom<IRCMessage> for UserStateMessage[src]

type Error = ServerMessageParseError

The type returned in the event of a conversion error.

Auto Trait Implementations

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> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

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

impl<T> Same<T> for T

type Output = T

Should always be Self

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.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,