Struct tg_flows::StickerSet
source · pub struct StickerSet {
pub name: String,
pub title: String,
pub kind: StickerType,
pub format: StickerFormat,
pub stickers: Vec<Sticker>,
pub thumb: Option<PhotoSize>,
}Expand description
This object represents a sticker set.
Fields§
§name: StringSticker set name.
title: StringSticker set title.
kind: StickerTypeSticker type shared by all stickers in this set.
format: StickerFormatSticker format shared by all stickers in this set.
stickers: Vec<Sticker>List of all set stickers.
thumb: Option<PhotoSize>Sticker set thumbnail in the .webp, .tgs or .webm format.
Implementations§
source§impl StickerSet
impl StickerSet
sourcepub fn is_raster(&self) -> bool
pub fn is_raster(&self) -> bool
Returns true is this is a “normal” raster sticker.
Alias to self.format.is_raster().
sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
Returns true is this is an animated sticker.
Alias to self.format.is_animated().
sourcepub fn is_video(&self) -> bool
pub fn is_video(&self) -> bool
Returns true is this is a video sticker.
Alias to self.format.is_video().
Methods from Deref<Target = StickerType>§
sourcepub fn is_regular(&self) -> bool
pub fn is_regular(&self) -> bool
Returns true if the sticker type is Regular.
sourcepub fn is_custom_emoji(&self) -> bool
pub fn is_custom_emoji(&self) -> bool
Returns true if the sticker type is CustomEmoji.
Trait Implementations§
source§impl Clone for StickerSet
impl Clone for StickerSet
source§fn clone(&self) -> StickerSet
fn clone(&self) -> StickerSet
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moresource§impl Debug for StickerSet
impl Debug for StickerSet
source§impl Deref for StickerSet
impl Deref for StickerSet
This allows calling StickerType’s methods directly on StickerSet.
use teloxide_core::types::StickerSet;
let sticker: StickerSet = todo!();
let _ = sticker.is_mask();
let _ = sticker.kind.is_mask();source§impl<'de> Deserialize<'de> for StickerSet
impl<'de> Deserialize<'de> for StickerSet
source§fn 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
source§impl PartialEq<StickerSet> for StickerSet
impl PartialEq<StickerSet> for StickerSet
source§fn eq(&self, other: &StickerSet) -> bool
fn eq(&self, other: &StickerSet) -> bool
This method tests for
self and other values to be equal, and is used
by ==.