#[non_exhaustive]
pub enum Kind {
Plain,
Animated,
Mask(MaskPosition),
}
Expand description
Represents different kinds of a Sticker
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Plain
The sticker is neither animated nor a mask.
Animated
The sticker is animated.
Mask(MaskPosition)
The sticker is a mask.
Implementations§
source§impl Kind
impl Kind
sourcepub fn is_animated(&self) -> bool
pub fn is_animated(&self) -> bool
Returns true
if self
is of variant Animated
.
sourcepub fn expect_mask(self) -> MaskPositionwhere
Self: Debug,
pub fn expect_mask(self) -> MaskPositionwhere
Self: Debug,
sourcepub fn mask(self) -> Option<MaskPosition>
pub fn mask(self) -> Option<MaskPosition>
Returns Some
if self
is of variant Mask
, and None
otherwise.