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
“Normal”, raster, animated or video sticker.
Fields
Premium animation for the sticker, if the sticker is premium.
Mask
Mask sticker.
Fields
§
mask_position: MaskPosition
For mask stickers, the position where the mask should be placed.
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 duplicate 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 for StickerKind
impl PartialEq for StickerKind
Source§impl Serialize for StickerKind
impl Serialize for StickerKind
impl StructuralPartialEq for StickerKind
Auto Trait Implementations§
impl Freeze for StickerKind
impl RefUnwindSafe for StickerKind
impl Send for StickerKind
impl Sync for StickerKind
impl Unpin for StickerKind
impl UnwindSafe for StickerKind
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Erasable for T
impl<T> Erasable for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more