[][src]Struct twitch_irc::message::Emote

pub struct Emote {
    pub id: String,
    pub char_range: Range<usize>,
    pub code: String,
}

A single emote, appearing as part of a message.

Fields

id: String

An ID identifying this emote. For example 25 for the "Kappa" emote, but can also be non-numeric, for example on emotes modified using Twitch channel points, e.g. 301512758_TK for pajaDent_TK where 301512758 is the ID of the original pajaDent emote.

char_range: Range<usize>

A range of characters in the original message where the emote is placed.

As is documented on Range, the start index of this range is inclusive, while the end index is exclusive.

This is always the exact range of characters that Twitch originally sent. Note that due to a Twitch bug (that this library intentionally works around), the character range specified here might be out-of-bounds for the original message text string.

code: String

This is the text that this emote replaces, e.g. Kappa or :).

Trait Implementations

impl Clone for Emote[src]

impl Debug for Emote[src]

impl PartialEq<Emote> for Emote[src]

impl StructuralPartialEq for Emote[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> 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>,