[][src]Struct twitchchat::messages::UserState

pub struct UserState<'t> {
    pub tags: Tags<'t>,
    pub channel: Cow<'t, str>,
}

Identifies a user's chat settings or properties (e.g., chat color)..

Fields

tags: Tags<'t>

Tags attached to this message

channel: Cow<'t, str>

Channel this event happened on

Methods

impl<'t> UserState<'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 color(&self) -> Option<Color>[src]

The user's color, if set

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

The user's display name, if set

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

Emotes attached to this message

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

Whether this user a is a moderator

Trait Implementations

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

type Owned = UserState<'static>

The owned type

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

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

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

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

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

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

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

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

Auto Trait Implementations

impl<'t> RefUnwindSafe for UserState<'t>

impl<'t> Send for UserState<'t>

impl<'t> Sync for UserState<'t>

impl<'t> Unpin for UserState<'t>

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