Struct twitch_api::helix::chat::get_emote_sets::Emote
source · [−]#[non_exhaustive]pub struct Emote {
pub id: EmoteId,
pub name: String,
pub images: Image,
pub emote_type: String,
pub emote_set_id: EmoteSetId,
pub owner_id: UserId,
pub format: Vec<EmoteAnimationSetting>,
pub scale: Vec<EmoteScale>,
pub theme_mode: Vec<EmoteThemeMode>,
}
Available on crate feature
helix
only.Expand description
Return Values for Get Channel Emotes
Fields (Non-exhaustive)
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.id: EmoteId
Emote ID.
name: String
Name of the emote a viewer types into Twitch chat for the image to appear.
images: Image
Object of image URLs for the emote.
emote_type: String
The type of emote.
emote_set_id: EmoteSetId
ID of the emote set the emote belongs to.
owner_id: UserId
User ID of the broadcaster who owns the emote.
format: Vec<EmoteAnimationSetting>
The formats that the emote is available in.
scale: Vec<EmoteScale>
The sizes that the emote is available in.
theme_mode: Vec<EmoteThemeMode>
The background themes that the emote is available in.
Implementations
sourceimpl Emote
impl Emote
sourcepub fn url(&self) -> EmoteUrlBuilder<'_>
pub fn url(&self) -> EmoteUrlBuilder<'_>
Create an emote builder for this emote.
Examples
use twitch_api::helix::{self, chat::get_channel_emotes};
let emotes = client.get_emote_sets(["301590448"], &token).await?;
assert_eq!(emotes[0].url().size_3x().dark_mode().render(), "https://static-cdn.jtvnw.net/emoticons/v2/emotesv2_dc24652ada1e4c84a5e3ceebae4de709/default/dark/3.0");
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Emote
impl<'de> Deserialize<'de> for Emote
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Emote
impl StructuralEq for Emote
impl StructuralPartialEq for Emote
Auto Trait Implementations
impl RefUnwindSafe for Emote
impl Send for Emote
impl Sync for Emote
impl Unpin for Emote
impl UnwindSafe for Emote
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.