[][src]Struct twitch_irc::message::GlobalUserStateMessage

pub struct GlobalUserStateMessage {
    pub user_id: 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 once directly after successful login, containing properties for the logged in user.

This message is not sent if you log into chat as an anonymous user.

Fields

user_id: String

ID of the logged in user

user_name: String

Name (also called 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.

However note that subscriber badges are not sent on GLOBALUSERSTATE messages, so you can realistically expect this to be empty unless Twitch adds a new feature.

badges: Vec<Badge>

List of badges the logged in user has in all channels.

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 GlobalUserStateMessage was parsed from.

Trait Implementations

impl Clone for GlobalUserStateMessage[src]

impl Debug for GlobalUserStateMessage[src]

impl From<GlobalUserStateMessage> for IRCMessage[src]

impl PartialEq<GlobalUserStateMessage> for GlobalUserStateMessage[src]

impl StructuralPartialEq for GlobalUserStateMessage[src]

impl TryFrom<IRCMessage> for GlobalUserStateMessage[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>,