[][src]Enum twitchchat::runner::Identity

pub enum Identity {
    Anonymous {
        caps: Capabilities,
    },
    Basic {
        name: String,
        caps: Capabilities,
    },
    Full {
        name: String,
        user_id: i64,
        display_name: Option<String>,
        color: Color,
        caps: Capabilities,
    },
}

Your identity on Twitch.

Currently this is only updated when you connect.

Variants

Anonymous

An anonymous identity.

Fields of Anonymous

caps: Capabilities

The capabilities you'll have

Basic

A basic identity.

This means you didn't enable all of the capabilities

Fields of Basic

name: String

Your username

caps: Capabilities

The capabilities you'll have

Full

A full identity

This has more information than a Basic identity.

This is created if you've enabled all of the capabilities.

Fields of Full

name: String

Your username

user_id: i64

Your user-id

display_name: Option<String>

Your display name, if set

color: Color

You display color, if set

caps: Capabilities

The capabilities you'll have

Implementations

impl Identity[src]

pub fn username(&self) -> &str[src]

Get your username from this identity

If its anonymous, it'll be justinfan1234

Trait Implementations

impl Clone for Identity[src]

impl Debug for Identity[src]

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, 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.