Enum tg_flows::StickerKind
source · pub enum StickerKind {
Regular {
premium_animation: Option<FileMeta>,
},
Mask {
mask_position: MaskPosition,
},
CustomEmoji {
custom_emoji_id: String,
},
}Expand description
Kind of a Sticker - regular, mask or custom emoji.
Dataful version of StickerType.
Variants§
Regular
Fields
Premium animation for the sticker, if the sticker is premium.
“Normal”, raster, animated or video sticker.
Mask
Fields
§
mask_position: MaskPositionFor mask stickers, the position where the mask should be placed.
Mask sticker.
CustomEmoji
Custom emoji sticker.
Implementations§
source§impl StickerKind
impl StickerKind
sourcepub fn type_(&self) -> StickerType
pub fn type_(&self) -> StickerType
Converts StickerKind to StickerType
sourcepub fn is_regular(&self) -> bool
pub fn is_regular(&self) -> bool
Returns true if the sticker kind is Regular.
sourcepub fn is_custom_emoji(&self) -> bool
pub fn is_custom_emoji(&self) -> bool
Returns true if the sticker kind is CustomEmoji.
Getter for StickerKind::Regular::premium_animation.
sourcepub fn mask_position(&self) -> Option<MaskPosition>
pub fn mask_position(&self) -> Option<MaskPosition>
Getter for StickerKind::Mask::mask_position.
sourcepub fn custom_emoji_id(&self) -> Option<&str>
pub fn custom_emoji_id(&self) -> Option<&str>
Getter for StickerKind::CustomEmoji::custom_emoji_id.
Trait Implementations§
source§impl Clone for StickerKind
impl Clone for StickerKind
source§fn clone(&self) -> StickerKind
fn clone(&self) -> StickerKind
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 StickerKind
impl Debug for StickerKind
source§impl<'de> Deserialize<'de> for StickerKind
impl<'de> Deserialize<'de> for StickerKind
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<StickerKind> for StickerKind
impl PartialEq<StickerKind> for StickerKind
source§fn eq(&self, other: &StickerKind) -> bool
fn eq(&self, other: &StickerKind) -> bool
This method tests for
self and other values to be equal, and is used
by ==.